/// <inheritdoc /> public override void Update() { base.Update(); // Invoke our custom event on each update. Subscribe to MyCustomEvent get events. MyCustomEvent?.Invoke(); }
public static void TriggerEvent(string eventName, string data) { MyCustomEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.Invoke(data); } }