add scriptable object examples
add editor window example add attribute + drawer example
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
[CustomEditor(typeof(EventBroker))]
|
||||
public class EventBrokerEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (!EditorApplication.isPlaying) return;
|
||||
|
||||
if (GUILayout.Button("Player Died"))
|
||||
{
|
||||
(target as EventBroker)?.RaisePlayerDied();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user