-
-
Notifications
You must be signed in to change notification settings - Fork 0
LayeredUnityAction
Eric Lowry edited this page Jul 16, 2023
·
1 revision
Namespace: Lowry.UI.InputLayers
internal sealed class LayeredUnityAction : LayeredAction
Extends the LayeredAction class to trigger corresponding UnityEvents🔗 when its delegates are performed.
This class is used to make LayeredActions accessible in situations where UnityEvents🔗 are preferable to standard delegates.
The IL_LayeredAction script uses this methodology to ensure InputLayers can be used entirely within the Unity Inspector.
public UnityEvent onPerformedUnityEvent;
Triggered when base._action gets Performed and base._layer is active.
public UnityEvent onStartedUnityEvent;
Triggered when base._action gets Started and base._layer is active.
public UnityEvent onCanceledUnityEvent;
Triggered when base._action gets Canceled and base._layer is active.
protected override void ActionPerformed(InputAction.CallbackContext context) {...}
protected override void ActionStarted(InputAction.CallbackContext context) {...}
protected override void ActionCanceled(InputAction.CallbackContext context) {...}
👉🏻 Download InputLayers on the Unity Asset Store!