24 lines
522 B
C#
24 lines
522 B
C#
using UnityEditor;
|
|
|
|
namespace Ktyl.Util
|
|
{
|
|
public abstract class SerialVarEditor<T> : Editor
|
|
{
|
|
private SerialVar<T> _t;
|
|
|
|
protected virtual void OnEnable()
|
|
{
|
|
_t = target as SerialVar<T>;
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
base.OnInspectorGUI();
|
|
|
|
EditorGUI.BeginDisabledGroup(true);
|
|
EditorGUILayout.LabelField("Current Value", _t.Value.ToString());
|
|
EditorGUI.EndDisabledGroup();
|
|
}
|
|
}
|
|
|
|
} |