2020-12-14 20:27:44 +01:00
|
|
|
|
using UnityEngine;
|
2020-12-10 19:51:02 +01:00
|
|
|
|
using UnityEditor;
|
|
|
|
|
|
|
|
|
|
namespace TAO.VertexAnimation.Editor
|
|
|
|
|
{
|
|
|
|
|
[CustomEditor(typeof(VA_AnimationBook))]
|
|
|
|
|
public class VA_AnimationBookEditor : UnityEditor.Editor
|
|
|
|
|
{
|
|
|
|
|
private VA_AnimationBook animationBook = null;
|
|
|
|
|
|
|
|
|
|
void OnEnable()
|
|
|
|
|
{
|
|
|
|
|
animationBook = target as VA_AnimationBook;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnInspectorGUI()
|
|
|
|
|
{
|
|
|
|
|
serializedObject.Update();
|
|
|
|
|
|
2021-01-19 15:24:13 +01:00
|
|
|
|
EditorGUILayout.PropertyField(serializedObject.FindProperty("positionMap"));
|
|
|
|
|
EditorGUILayout.PropertyField(serializedObject.FindProperty("animations"));
|
|
|
|
|
EditorGUILayout.PropertyField(serializedObject.FindProperty("materials"));
|
|
|
|
|
|
|
|
|
|
EditorGUILayoutUtils.HorizontalLine(color: Color.gray);
|
|
|
|
|
|
|
|
|
|
using (new EditorGUI.DisabledScope(disabled: true))
|
|
|
|
|
{
|
|
|
|
|
EditorGUILayout.IntField(new GUIContent("MaxFrames"), animationBook.MaxFrames);
|
|
|
|
|
}
|
2020-12-10 19:51:02 +01:00
|
|
|
|
|
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|