Skip to content

EventBus

Namespace Mc.Scripting · Kind class (static)

public static class EventBus

Owner-less event firing helpers.

Member Description
static bool Fire<T>(ref T ev) where T : struct, IEvent Fires an event through the native bus; returns false if it was cancelled.
static bool HasSubscribers<T>() where T : struct, IEvent Whether anybody (native or managed) listens to T.
public static bool Fire<T>(ref T ev) where T : struct, IEvent

Fires an event through the native bus; returns false if it was cancelled.

Parameters

Name Type Description
ev ref T

Returns bool

public static bool HasSubscribers<T>() where T : struct, IEvent

Whether anybody (native or managed) listens to T.

Returns bool

IEvent