You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
432 B
20 lines
432 B
using UnityEditor; |
|
using UnityEngine; |
|
|
|
namespace Architecture.Events |
|
{ |
|
[CustomEditor(typeof(GameEvent))] |
|
public class EventEditor : Editor |
|
{ |
|
public override void OnInspectorGUI() |
|
{ |
|
base.OnInspectorGUI(); |
|
|
|
GUI.enabled = Application.isPlaying; |
|
|
|
GameEvent e = target as GameEvent; |
|
if (GUILayout.Button("Raise")) |
|
e.Raise(); |
|
} |
|
} |
|
} |