Inheritance
System.Object
InputActionSetupExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
public static class InputActionSetupExtensions
Methods
Declaration
public static InputAction AddAction(this InputActionMap map, string name, string binding = null, string interactions = null, string groups = null, string expectedControlLayout = null)
Parameters
Type |
Name |
Description |
InputActionMap |
map |
|
System.String |
name |
|
System.String |
binding |
|
System.String |
interactions |
|
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 groups = null)
Parameters
Type |
Name |
Description |
InputAction |
action |
|
System.String |
path |
|
System.String |
interactions |
|
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
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 |
|
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
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.
|
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