private static void DrawRaise(IGameEvent gameEvent) { GameEventEditors.DrawPlaymodeLabel("Raise event"); if (GUILayout.Button("Raise")) { gameEvent.RaiseGameEvent(); } }
private void DrawRaise(TGameEvent gameEvent) { GameEventEditors.DrawPlaymodeLabel("Raise event"); GUILayout.BeginHorizontal(); argumentValue = DrawArgumentField(argumentValue); if (GUILayout.Button("Raise")) { gameEvent.RaiseGameEvent(argumentValue); } GUILayout.EndHorizontal(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (!(target is TGameEvent gameEvent)) { return; } GUI.enabled = Application.isPlaying; EditorGUILayout.Space(); DrawRaise(gameEvent); EditorGUILayout.Space(); GameEventEditors.DrawReferences(gameEvent); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); var gameEvent = target as GameEvent; if (gameEvent == null) { return; } GUI.enabled = Application.isPlaying; EditorGUILayout.Space(); DrawRaise(gameEvent); if (!Application.isPlaying) { return; } EditorGUILayout.Space(); GameEventEditors.DrawReferences(gameEvent); }