public static Routine EventAsync <TEvent>(TEvent arg) { #if UNITY_EDITOR if (!Application.isPlaying) { throw new PlatformNotSupportedException(); } #endif var handlers = EventManagerDispatcher <TEvent> .GetEventManager().GetEventHandlers(); var runner = EventHandlerRunnerBuilder <TEvent> .Create(handlers, arg); return(EventScheduler.ExecuteAsync(runner)); }
public static void Event <TEvent>(TEvent arg) { #if UNITY_EDITOR if (!Application.isPlaying) { throw new PlatformNotSupportedException(); } #endif var handlers = EventManagerDispatcher <TEvent> .GetEventManager().GetEventHandlers(); var runner = EventHandlerRunnerBuilder <TEvent> .Create(handlers, arg); EventScheduler.Schedule(runner); }