InputActionsAsset

The project's action maps as an authored asset: what the game's actions are and which controls drive them. Created from the asset browser like any other data asset, edited in the inspector, and handed to InputActionService at startup.

Properties

Maps

(List) { get; set } = []: The maps this asset defines.

Actions

(IEnumerable): Every action in every map, in declaration order.

Public Methods

Find

public InputAction? Find(string? path)

Finds an action by Map/Action, or by a bare action name searched across every map.

Parameters:

  • path (string?): The action to find, e.g. Gameplay/Jump or just Jump.

Returns: InputAction?

  • The action, or null when nothing matches.

CreateDefault

public static InputActionsAsset CreateDefault()

The default maps a project gets before anything is authored: WASD and a left stick driving Move, the mouse and right stick driving Look, and Space or the south face button driving Jump.

Returns: InputActionsAsset

  • A freshly built asset.