ScriptableEventListener Class
Definition
Section titled “Definition”Listens to a ScriptableEvent without arguments.
[AddComponentMenu("Scriptable Values/Listeners/Events/Scriptable Event Listener", 1100)]public class ScriptableEventListener : ScriptableListenerBaseInheritance object → UnityEngine.Object → UnityEngine.Component → UnityEngine.Behaviour → UnityEngine.MonoBehaviour → ScriptableListenerBase
Properties
Section titled “Properties”TargetEvent
Section titled “TargetEvent”The event to listen to.
public ScriptableEvent? TargetEvent { get; set; }OnInvoked
Section titled “OnInvoked”The event to invoke when the target event is raised.
public UnityEvent OnInvoked { get; }Methods
Section titled “Methods”SetListening(bool)
Section titled “SetListening(bool)”Sets the listening state of the object.
protected override sealed void SetListening(bool listen)Parameters
Section titled “Parameters”listen bool
If the object should listen to the target value.
OnBeforeEventInvoked(object)
Section titled “OnBeforeEventInvoked(object)”Called before the event is invoked.
protected virtual bool OnBeforeEventInvoked(object sender)Parameters
Section titled “Parameters”sender object
The object that sent the event.
Returns
Section titled “Returns”bool
true if the event should be invoked; otherwise, false.
OnAfterEventInvoked(object)
Section titled “OnAfterEventInvoked(object)”Called after the event is invoked.
protected virtual void OnAfterEventInvoked(object sender)Parameters
Section titled “Parameters”sender object
The object that sent the event.