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()) { } } } }