add scriptable object examples
add editor window example add attribute + drawer example
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Core;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
[CustomEditor(typeof(CharacterAttributes))]
|
||||
public class CharacterAttributesEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (GUILayout.Button("Open Character Attributes Editor"))
|
||||
{
|
||||
CharacterAttributesWindow window = EditorWindow.GetWindow<CharacterAttributesWindow>();
|
||||
window.CharacterAttributesToEdit = target as CharacterAttributes;
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user