using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace ActionTool { [CustomPropertyDrawer(typeof(ParameterDictionary))] public class ParameterDictionaryDrawer : SerializableDictionaryPropertyDrawer { } public class AnimationParameterEditor : EditorWindow { SerializedObject obj; private void OnEnable() { titleContent = new GUIContent("Parameters"); 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("parameters"); EditorGUILayout.PropertyField(curves, true); if (obj.ApplyModifiedProperties()) { } } } }