Inheritance
System.Object
InputActionSetupExtensions
 
public static class InputActionSetupExtensions
 
Methods
  
Declaration
public static InputAction AddAction(this InputActionMap map, string name, string binding = null, string interactions = null, string processors = null, string groups = null, string expectedControlLayout = null)
 
Parameters
| Type | Name | Description | 
| InputActionMap | map |  | 
| System.String | name |  | 
| System.String | binding |  | 
| System.String | interactions |  | 
| System.String | processors |  | 
| System.String | groups |  | 
| System.String | expectedControlLayout |  | 
Returns
Declaration
public static InputActionMap AddActionMap(this InputActionAsset asset, string name)
 
Parameters
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputAction action, string path, string interactions = null, string processors = null, string groups = null)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.String | path |  | 
| System.String | interactions |  | 
| System.String | processors |  | 
| System.String | groups |  | 
Returns
Add a new binding to the action.
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputAction action, InputBinding binding)
 
Parameters
Returns
Add a binding that references the given control and triggers
the given .
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputAction action, InputControl control)
 
Parameters
| Type | Name | Description | 
| InputAction | action | Action to trigger. Also determines where to add the binding. If the action is not part
of an InputActionMap, the binding is added directly to action.
If it is part of a map, the binding is added to the action map (actionMap). | 
| InputControl | control | Control to binding to. The full path of the control will
be used in the resulting InputBinding. | 
Returns
Exceptions
| Type | Condition | 
| System.ArgumentNullException | actionis null orcontrolis null.
 | 
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputActionMap actionMap, string path, Guid action, string interactions = null, string groups = null)
 
Parameters
| Type | Name | Description | 
| InputActionMap | actionMap |  | 
| System.String | path |  | 
| System.Guid | action |  | 
| System.String | interactions |  | 
| System.String | groups |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputActionMap actionMap, string path, string interactions = null, string groups = null, string action = null)
 
Parameters
| Type | Name | Description | 
| InputActionMap | actionMap |  | 
| System.String | path |  | 
| System.String | interactions |  | 
| System.String | groups |  | 
| System.String | action |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputActionMap actionMap, string path, InputAction action, string interactions = null, string groups = null)
 
Parameters
| Type | Name | Description | 
| InputActionMap | actionMap |  | 
| System.String | path |  | 
| InputAction | action |  | 
| System.String | interactions |  | 
| System.String | groups |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax AddBinding(this InputActionMap actionMap, InputBinding binding)
 
Parameters
Returns
Declaration
public static InputActionSetupExtensions.CompositeSyntax AddCompositeBinding(this InputAction action, string composite, string interactions = null)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.String | composite |  | 
| System.String | interactions |  | 
Returns
Add a new control scheme to the given asset.
Declaration
public static InputActionSetupExtensions.ControlSchemeSyntax AddControlScheme(this InputActionAsset asset, string name)
 
Parameters
| Type | Name | Description | 
| InputActionAsset | asset | Asset to add the control scheme to. | 
| System.String | name | Name to give to the control scheme. Must be unique within the control schemes of the
asset. Also used as default name of bindingGroup associated
with the control scheme. | 
Returns
Exceptions
| Type | Condition | 
| System.ArgumentNullException | assetis null ornameis null or empty.
 | 
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBinding(this InputAction action, int index)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.Int32 | index |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBinding(this InputAction action, InputBinding match)
 
Parameters
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBindingWithGroup(this InputAction action, string group)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.String | group |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBindingWithId(this InputAction action, Guid id)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.Guid | id |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBindingWithId(this InputAction action, string id)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.String | id |  | 
Returns
Declaration
public static InputActionSetupExtensions.BindingSyntax ChangeBindingWithPath(this InputAction action, string path)
 
Parameters
| Type | Name | Description | 
| InputAction | action |  | 
| System.String | path |  | 
Returns
Declaration
public static InputControlScheme OrWithOptionalDevice(this InputControlScheme scheme, string controlPath)
 
Parameters
Returns
Declaration
public static InputControlScheme OrWithRequiredDevice(this InputControlScheme scheme, string controlPath)
 
Parameters
Returns
Rename an existing action.
Declaration
public static void Rename(this InputAction action, string newName)
 
Parameters
| Type | Name | Description | 
| InputAction | action | Action to assign a new name to. Can be singleton action or action that
is part of a map. | 
| System.String | newName | New name to assign to action. Cannot be empty. | 
Exceptions
| Type | Condition | 
| System.ArgumentNullException | actionis null ornewNameis
    null or empty.
 | 
| System.InvalidOperationException | actionMap of actionalready contains an action callednewName. | 
Declaration
public static void Rename(this InputActionAsset asset, InputActionMap map)
 
Parameters
Declaration
public static InputControlScheme WithBindingGroup(this InputControlScheme scheme, string bindingGroup)
 
Parameters
Returns
Declaration
public static InputControlScheme WithOptionalDevice(this InputControlScheme scheme, string controlPath)
 
Parameters
Returns
Declaration
public static InputControlScheme WithRequiredDevice(this InputControlScheme scheme, string controlPath)
 
Parameters
Returns