22 lines
479 B
C#
22 lines
479 B
C#
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();
|
|
}
|
|
}
|
|
}
|
|
} |