21 lines
638 B
C#
21 lines
638 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Data.Editor
|
|
{
|
|
[CustomEditor(typeof(CharacterAttributes))]
|
|
public class CharacterAttributesEditor : UnityEditor.Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
base.OnInspectorGUI();
|
|
|
|
if (GUILayout.Button("Open Character Attributes Window"))
|
|
{
|
|
CharacterAttributesWindow window = (CharacterAttributesWindow)EditorWindow.GetWindow(typeof(CharacterAttributesWindow));
|
|
window.CharacterAttributesToEdit = target as CharacterAttributes;
|
|
window.Show();
|
|
}
|
|
}
|
|
}
|
|
} |