Inheritance
System.Object
InputActionMap
public class InputActionMap : ICloneable, ISerializationCallbackReceiver, IInputActionCollection, IEnumerable<InputAction>
Constructors
Declaration
public InputActionMap(string name = null, InputActionMap extend = null)
Parameters
Properties
List of actions contained in the map.
Declaration
public ReadOnlyArray<InputAction> actions { get; }
Property Value
If the action map is part of an asset, this refers to the asset. Otherwise it is null.
Declaration
public InputActionAsset asset { get; }
Property Value
Optional mask applied to all bindings in the collection.
Declaration
public InputBinding? bindingMask { get; set; }
Property Value
Implements
List of bindings contained in the map.
Declaration
public ReadOnlyArray<InputBinding> bindings { get; }
Property Value
Declaration
public ReadOnlyArray<InputControlScheme> controlSchemes { get; }
Property Value
Implements
Devices to use with the actions in this collection.
Declaration
public ReadOnlyArray<InputDevice>? devices { get; set; }
Property Value
| Type |
Description |
| System.Nullable<ReadOnlyArray<InputDevice>> |
|
Implements
Whether any action in the map is currently enabled.
Declaration
public bool enabled { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
A stable, unique identifier for the map.
Declaration
Property Value
Declaration
public InputAction this[string actionNameOrId] { get; }
Parameters
| Type |
Name |
Description |
| System.String |
actionNameOrId |
|
Property Value
Declaration
public string name { get; }
Property Value
| Type |
Description |
| System.String |
|
Methods
Declaration
public InputActionMap Clone()
Returns
Declaration
public bool Contains(InputAction action)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implements
Disable all the actions in the map.
Declaration
Implements
Enable all the actions in the map.
Declaration
Implements
Declaration
public static InputActionMap[] FromJson(string json)
Parameters
| Type |
Name |
Description |
| System.String |
json |
|
Returns
Declaration
public InputAction GetAction(Guid id)
Parameters
| Type |
Name |
Description |
| Guid |
id |
|
Returns
Declaration
public InputAction GetAction(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
Enumerate the actions in the map.
Declaration
public IEnumerator<InputAction> GetEnumerator()
Returns
| Type |
Description |
| IEnumerator<InputAction> |
An enumerator going over the actions in the map.
|
Declaration
public void OnAfterDeserialize()
Declaration
public void OnBeforeSerialize()
Declaration
Returns
| Type |
Description |
| System.String |
|
Declaration
public static string ToJson(IEnumerable<InputActionMap> sets)
Parameters
Returns
| Type |
Description |
| System.String |
|
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Declaration
public InputAction TryGetAction(Guid id)
Parameters
| Type |
Name |
Description |
| Guid |
id |
|
Returns
Declaration
public InputAction TryGetAction(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
Events
Add or remove a callback that is triggered when an action in the map changes its InputActionPhase.
Declaration
public event Action<InputAction.CallbackContext> actionTriggered
Event Type