示例#1
0
 public void GetTweenerEditor()
 {
     if (TweenerEditor == null)
     {
         if (TweenEditorUtil.TweenerEditorTypeDic.TryGetValue(Target.Param.Type, out var tweenerType))
         {
             TweenerEditor = Activator.CreateInstance(tweenerType) as TweenerEditor;
             if (TweenerEditor == null)
             {
                 return;
             }
             TweenerEditor.Mode       = TweenerEditorMode.Asset;
             TweenerEditor.TweenParam = Target.Param;
             TweenerEditor.Init();
         }
     }
     else
     {
         if (TweenerEditor.Type == Target.Param.Type)
         {
             return;
         }
         TweenerEditor = null;
         GetTweenerEditor();
     }
 }
示例#2
0
        public void DrawTweener()
        {
            GetTweenerEditor();
            if (TweenerEditor == null)
            {
                if (Target.Type != TweenType.None)
                {
                    EditorGUILayout.LabelField(Target.Type + " not support run with Component! OnInspectorGUI call failed!");
                }

                return;
            }

            if (!TweenerEditor.TweenAnimation.HasRequireComponent)
            {
                EditorGUILayout.LabelField("No valid component was found!");
                var fixRequireComponentBtn = GUILayout.Button("Auto Fix / Recheck Require Component");
                if (fixRequireComponentBtn)
                {
                    TweenerEditor.TweenAnimation.FixRequireComponent();
                    TweenerEditor.TweenAnimation.CheckRequireComponent();
                }

                return;
            }

            TweenerEditor.OnInspectorGUI(TweenParamSerializedProperty);
        }
示例#3
0
        public void DrawTweener()
        {
            GetTweenerEditor();
            if (TweenerEditor == null)
            {
                if (Target.Param.Type != TweenType.None)
                {
                    EditorGUILayout.LabelField(Target.Param.Type + " not support run with Component!");
                }

                return;
            }

            TweenerEditor.OnInspectorGUI(TweenParamSerializedProperty);
        }
示例#4
0
        public void DrawTweenerSceneGUI()
        {
            GetTweenerEditor();
            if (TweenerEditor == null)
            {
                if (Target.Type != TweenType.None)
                {
                    EditorGUILayout.LabelField(Target.Type + " not support run with Component! OnSceneGUI call failed!");
                }

                return;
            }

            TweenerEditor.OnSceneGUI();
        }