Esempio n. 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();
     }
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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();
        }