Skip to content

ScriptableEventListener Class

Listens to a ScriptableEvent without arguments.

C#
[AddComponentMenu("Scriptable Values/Listeners/Events/Scriptable Event Listener", 1100)]
public class ScriptableEventListener : ScriptableListenerBase

Inheritance object → UnityEngine.Object → UnityEngine.Component → UnityEngine.Behaviour → UnityEngine.MonoBehaviour → ScriptableListenerBase

The event to listen to.

C#
public ScriptableEvent? TargetEvent { get; set; }

The event to invoke when the target event is raised.

C#
public UnityEvent OnInvoked { get; }

Sets the listening state of the object.

C#
protected override sealed void SetListening(bool listen)

listen bool
If the object should listen to the target value.

Called before the event is invoked.

C#
protected virtual bool OnBeforeEventInvoked(object sender)

sender object
The object that sent the event.

bool
true if the event should be invoked; otherwise, false.

Called after the event is invoked.

C#
protected virtual void OnAfterEventInvoked(object sender)

sender object
The object that sent the event.