diff options
Diffstat (limited to 'Assets/ActionTool/Editor/AnimationPropertyEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/AnimationPropertyEditor.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Assets/ActionTool/Editor/AnimationPropertyEditor.cs b/Assets/ActionTool/Editor/AnimationPropertyEditor.cs new file mode 100644 index 00000000..59786bf9 --- /dev/null +++ b/Assets/ActionTool/Editor/AnimationPropertyEditor.cs @@ -0,0 +1,54 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +namespace ActionTool +{ + + [CustomPropertyDrawer(typeof(PropertyDictionary))] + public class PropertyDictionaryDrawer : SerializableDictionaryPropertyDrawer { } + + public class AnimationPropertyEditor : EditorWindow + { + + SerializedObject obj; + + private void OnEnable() + { + titleContent = new GUIContent("Properties"); + minSize = new Vector2(300, 200); + maxSize = new Vector2(300, 2000); + } + + 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("properties"); + EditorGUILayout.PropertyField(curves, true); + if (obj.ApplyModifiedProperties()) + { + } + } + } + +} |