Skip to content

IL_LayeredActionBase

Eric Lowry edited this page Feb 28, 2026 · 1 revision

Namespace: Lowry.UI.InputLayers

public abstract class IL_LayeredActionBase<T> : MonoBehaviour where T : LayeredAction

For use in the Inspector only.
A common abstract base class for all implementations of LayeredAction for inspector-based use.

💡General Information

This abstract class contains the core logic for exposing LayeredAction derived classes to the Unity Inspector.

By inheriting from this class, you can create custom components that manage different subsets of a LayeredAction, allowing them to be automatically enabled/disabled and having their associated IL_Layer activated/deactivated during Unity's lifecycle events (like Start and OnDestroy).

If you are just looking to use a standard action, you should use the IL_LayeredAction component.

📄Properties

__layeredAction

protected abstract T __layeredAction { get; }

Defines the InputAction🔗 that will trigger the events if the correct IL_Layer is active.
Must be implemented by derived classes to provide the specific LayeredAction instance.

📄Fields

_enableOnStart

private bool _enableOnStart = true;

If true, the LayeredAction provided by __layeredAction will remain enabled when the object is loaded.

_enableActionMapOnStart

private bool _enableActionMapOnStart = true;

If true, the InputActionMap🔗 associated with __layeredAction will be enabled when the object is loaded.

_enableInputActionOnStart

private bool _enableInputActionOnStart = true;

If true, the InputAction part of the __layeredAction will be enabled when the object is loaded.

_disableOnDestroy

protected bool _disableOnDestroy = true;

If true, the LayeredAction will be disabled when the object is destroyed.

_disableActionMapOnDestroy

protected bool _disableActionMapOnDestroy = false;

If true, the InputActionMap🔗 associated with the __layeredAction will be disabled when the object is destroyed.

_disableInputActionOnDestroy

protected bool _disableInputActionOnDestroy = false;

If true, the InputAction part of the __layeredAction will be disabled when the object is destroyed.

_activateLayerOnStart

private bool _activateLayerOnStart = true;

If true, the IL_Layer associated with __layeredAction will be activated when the object is loaded.

_deactivateLayerOnDestroy

protected bool _deactivateLayerOnDestroy = true;

If true, the IL_Layer associated with __layeredAction will be deactivated when the object is destroyed.

📄Methods

Enable()

public void Enable ()

Calls EnableWithParameters() with default values of enableActionMap = true and enableInputAction = true.

EnableWithParameters(bool, bool)

public abstract void EnableWithParameters (bool enableActionMap, bool enableInputAction)

Enables this script's LayeredAction and registers its events.
Inheriting classes must provide the specific implementation details for their registered actions.

Disable()

public void Disable ()

Calls DisableWithParameters() with default values of disableActionMap = false and disableInputAction = false.

DisableWithParameters(bool, bool)

public abstract void DisableWithParameters (bool disableActionMap, bool disableInputAction)

Disables this script's LayeredAction and unregisters its events.
Inheriting classes must provide the specific implementation details for their registered actions.

DisableActionMap()

public void DisableActionMap ()

Disables the InputActionMap🔗 that __layeredAction belongs to.

ActivateLayer()

public void ActivateLayer ()

Activates the IL_Layer that __layeredAction belongs to.

DeactivateLayer()

public void DeactivateLayer ()

Deactivates the IL_Layer that __layeredAction belongs to.

Clone this wiki locally