SanAndreasUnity/Assets/Scripts/Editor/FrameInspector.cs
2020-05-31 19:07:22 +02:00

37 lines
772 B
C#

using UnityEngine;
using UnityEditor;
namespace SanAndreasUnity.Editor
{
[CustomEditor(typeof(Behaviours.Frame))]
// [CanEditMultipleObjects]
public class FrameInspector : UnityEditor.Editor
{
void OnEnable()
{
}
public override void OnInspectorGUI()
{
base.DrawDefaultInspector ();
GUILayout.Space (10);
var frame = this.target as Behaviours.Frame;
EditorGUILayout.LabelField ("Bone id: " + frame.BoneId);
EditorGUILayout.LabelField ("Index: " + frame.Index);
EditorGUILayout.ObjectField ("Parent: ", frame.Parent, typeof(Behaviours.Frame), true);
EditorGUILayout.LabelField ("Parent index: " + frame.ParentIndex);
EditorGUILayout.LabelField ("Path: " + frame.Path);
}
}
}