diff --git a/cocos/3d/framework/sphere-light-component.ts b/cocos/3d/framework/sphere-light-component.ts index 5914949a79..77274a160c 100644 --- a/cocos/3d/framework/sphere-light-component.ts +++ b/cocos/3d/framework/sphere-light-component.ts @@ -45,7 +45,9 @@ export class SphereLightComponent extends LightComponent { protected _type = LightType.SPHERE; protected _light: SphereLight | null = null; - @property + @property({ + unit: 'lm', + }) get luminousPower () { return this._luminance * nt2lm(this._size); } @@ -55,7 +57,9 @@ export class SphereLightComponent extends LightComponent { if (this._light) { this._light.setLuminousPower(val, this._size); } } - @property + @property({ + unit: 'cd', + }) get luminance () { return this._luminance; } diff --git a/cocos/core/data/class.js b/cocos/core/data/class.js index cfac3fc81d..3321c8d8f4 100644 --- a/cocos/core/data/class.js +++ b/cocos/core/data/class.js @@ -1160,12 +1160,14 @@ function parseAttributes (cls, attrs, className, propName, usedInGetter) { //parseSimpleAttr('preventDeferredLoad', 'boolean'); if (CC_DEV) { parseSimpleAttr('displayName', 'string'); + parseSimpleAttr('displayOrder', 'number'); parseSimpleAttr('multiline', 'boolean'); if (attrs.readonly) { (attrsProto || getAttrsProto())[attrsProtoKey + 'readonly'] = true; } parseSimpleAttr('tooltip', 'string'); parseSimpleAttr('slide', 'boolean'); + parseSimpleAttr('unit', 'string'); } if (attrs.url) {