From 5ff140570f42ad1133803e87698d2bfba3d0dd03 Mon Sep 17 00:00:00 2001 From: knoxHuang Date: Tue, 10 Dec 2024 11:09:18 +0800 Subject: [PATCH 1/2] fix: skeleton & skin inspect panel display --- cocos/spine/skeleton.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index c27c2ef7b05..df67cb14c15 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -22,7 +22,20 @@ THE SOFTWARE. */ import { EDITOR_NOT_IN_PREVIEW, JSB } from 'internal:constants'; -import { ccclass, executeInEditMode, help, menu, serializable, type, displayName, override, displayOrder, editable, tooltip } from 'cc.decorator'; +import { + ccclass, + executeInEditMode, + help, + menu, + serializable, + type, + displayName, + override, + displayOrder, + editable, + tooltip, + visible, +} from 'cc.decorator'; import { Material, Texture2D } from '../asset/assets'; import { error, logID, warn } from '../core/platform/debug'; import { Enum, EnumType, ccenum } from '../core/value-types/enum'; @@ -373,6 +386,7 @@ export class Skeleton extends UIRenderer { /** * @engineInternal */ + @visible(true) @type(DefaultSkinsEnum) get _defaultSkinIndex (): number { if (this.skeletonData) { @@ -422,6 +436,7 @@ export class Skeleton extends UIRenderer { /** * @engineInternal */ + @visible(true) @type(SpineDefaultAnimsEnum) get _animationIndex (): number { const animationName = EDITOR_NOT_IN_PREVIEW ? this.defaultAnimation : this.animation; From f0975481ff61e6b4f408075fbe78f2cb83aac14a Mon Sep 17 00:00:00 2001 From: knoxHuang Date: Tue, 10 Dec 2024 11:12:06 +0800 Subject: [PATCH 2/2] refine code --- cocos/spine/skeleton.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index df67cb14c15..44abd31363c 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -22,20 +22,7 @@ THE SOFTWARE. */ import { EDITOR_NOT_IN_PREVIEW, JSB } from 'internal:constants'; -import { - ccclass, - executeInEditMode, - help, - menu, - serializable, - type, - displayName, - override, - displayOrder, - editable, - tooltip, - visible, -} from 'cc.decorator'; +import { ccclass, executeInEditMode, help, menu, serializable, type, override, displayOrder, editable, visible } from 'cc.decorator'; import { Material, Texture2D } from '../asset/assets'; import { error, logID, warn } from '../core/platform/debug'; import { Enum, EnumType, ccenum } from '../core/value-types/enum';