Skip to content

IL_Action

Eric Lowry edited this page Nov 15, 2024 · 5 revisions

Namespace: Lowry.UI.InputLayers

public struct IL_Action

Used to reference an InputAction🔗 from the IL_ScriptableRefs.r_actionsAssets (of type InputActionAsset🔗) using a custom inspector.

💡General Information

This structure is mainly for internal use, and it is unlikely that you will need to work with it directly.

Its main goal is to expose a custom property drawer for the Unity Inspector that can point to any InputAction🔗 you have configured within an InputActionAsset🔗 registered in the "Actions Assets" parameter field of the InputLayers editor window.

This is a core component of the LayeredAction system.

📄Fields

mapId

public int mapId;

Stores the position of the target actionId's InputActionMap🔗 parent within the InputActionAsset🔗.actionMaps🔗 list.

actionId

public int actionId;

Stores the position of the target InputAction🔗 within the map's InputActionMap🔗.asset🔗 list.

📄Properties

map

internal InputActionMap map { get {...} }

The InputActionMap🔗 this action belongs to.

action

internal InputAction action { get {...} }

The InputAction🔗 this struct represents.

mapEnabled

internal bool mapEnabled { get {...} }

true if map is enabled.

enabled

internal bool enabled { get {...} }

true if action is enabled.

📄Methods

Enable()

internal void Enable () {...}

Enables the InputAction🔗 this struct represents.

Disable()

internal void Disable () {...}

Disables the InputAction🔗 this struct represents.

GetActionMap()

private InputActionMap GetActionMap () {...}

For use in the map getter.

Returns: The InputActionMap🔗 this action belongs to.