Пример #1
0
        void DrawPartAnim()
        {
            EditorGUI.BeginChangeCheck();
            editPartDef.skeletonDataAsset = EditorGUILayout.ObjectField("动画", editPartDef.skeletonDataAsset, typeof(SkeletonDataAsset)) as SkeletonDataAsset;
            if (!editPartDef.skeletonDataAsset)
            {
                KVEditorHelper.DrawHelpBox("请设置动画", MessageType.Error);
                return;
            }


            if (!partInfo.partAnim)
            {
                KVEditorHelper.DrawButton("加载动画", () =>
                {
                    LoadPartAnim();
                });
            }
            else
            {
                partInfo.partAnim = EditorGUILayout.ObjectField(
                    "动画Object",
                    partInfo.partAnim,
                    typeof(SkeletonAnimation)) as SkeletonAnimation;
            }
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            KVEditorHelper.DrawHelpBox("这是角色组件");
            KVEditorHelper.DrawSpace();
            KVEditorHelper.DrawButton("Open PlayerPart", () =>
            {
                PlayerPartWindow.OpenPlayerWindow();
            });
//            base.OnInspectorGUI();
        }