blob: fd960b11628aeb982b6567626a43ab373b18a70a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 properties = obj.FindProperty("properties");
EditorGUILayout.PropertyField(properties, true);
if (obj.ApplyModifiedProperties())
{
}
}
}
}
|