diff options
author | chai <chaifix@163.com> | 2021-08-06 19:02:03 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-08-06 19:02:03 +0800 |
commit | 754ceacd8ab62e7094f1827ae45ea16a502725ad (patch) | |
tree | 7165384f470bf0c4ae261d7dd22876416c150964 /Assets/ActionTool/Editor/AnimationCurveEditor.cs | |
parent | 35f2e468715e12d93cb88f2258c2d0ae82d1d189 (diff) |
*curve
Diffstat (limited to 'Assets/ActionTool/Editor/AnimationCurveEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/AnimationCurveEditor.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Assets/ActionTool/Editor/AnimationCurveEditor.cs b/Assets/ActionTool/Editor/AnimationCurveEditor.cs new file mode 100644 index 00000000..fe19d2cf --- /dev/null +++ b/Assets/ActionTool/Editor/AnimationCurveEditor.cs @@ -0,0 +1,54 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +namespace ActionTool +{ + + [CustomPropertyDrawer(typeof(CurveDictionary))] + public class CurveDictionaryDrawer : SerializableDictionaryPropertyDrawer { } + + public class AnimationCurveEditor : EditorWindow + { + + SerializedObject obj; + + private void OnEnable() + { + titleContent = new GUIContent("Curves"); + maxSize = new Vector2(300, 200); + minSize = maxSize; + } + + private void OnDisable() + { + } + + private void Update() + { + } + + private void OnGUI() + { + AnimationData animData = ActionManager.animationData; + if (animData == null) + { + this.Close(); + return; + } + + if (obj == null || obj.targetObject != animData) + { + obj = new SerializedObject(animData); + } + + var curves = obj.FindProperty("curves"); + EditorGUILayout.PropertyField(curves, true); + if (obj.ApplyModifiedProperties()) + { + } + } + } + +} |