Extensions to help with dynamically rebinding InputAction in
various ways.
Inheritance
System.Object
InputActionRebindingExtensions
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 InputActionRebindingExtensions
Methods
Declaration
public static void ApplyBindingOverride(this InputAction action, int bindingIndex, string path)
Parameters
Type |
Name |
Description |
InputAction |
action |
|
System.Int32 |
bindingIndex |
|
System.String |
path |
|
Declaration
public static void ApplyBindingOverride(this InputAction action, int bindingIndex, InputBinding bindingOverride)
Parameters
Declaration
public static void ApplyBindingOverride(this InputAction action, string newPath, string group = null, string path = null)
Parameters
Type |
Name |
Description |
InputAction |
action |
|
System.String |
newPath |
|
System.String |
group |
|
System.String |
path |
|
Declaration
public static void ApplyBindingOverride(this InputAction action, InputBinding bindingOverride)
Parameters
Declaration
public static void ApplyBindingOverride(this InputActionMap actionMap, int bindingIndex, InputBinding bindingOverride)
Parameters
Apply the given binding override to all bindings in the map that are matched by the override.
Declaration
public static int ApplyBindingOverride(this InputActionMap actionMap, InputBinding bindingOverride)
Parameters
Returns
Type |
Description |
System.Int32 |
The number of bindings overridden in the given map.
|
Declaration
public static void ApplyBindingOverrides(this InputActionMap actionMap, IEnumerable<InputBinding> overrides)
Parameters
Declaration
public static int ApplyBindingOverridesOnMatchingControls(this InputAction action, InputControl control)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static int ApplyBindingOverridesOnMatchingControls(this InputActionMap actionMap, InputControl control)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static IEnumerable<InputBinding> GetBindingOverrides(this InputAction action)
Parameters
Returns
Declaration
public static int GetBindingOverrides(this InputAction action, List<InputBinding> overrides)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Get all overrides applied to bindings in the given map.
Declaration
public static IEnumerable<InputBinding> GetBindingOverrides(this InputActionMap actionMap)
Parameters
Returns
Declaration
public static int GetBindingOverrides(this InputActionMap actionMap, List<InputBinding> overrides)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Initiate an operation that interactively rebinds the given action based on received input.
Declaration
public static InputActionRebindingExtensions.RebindingOperation PerformInteractiveRebinding(this InputAction action)
Parameters
Type |
Name |
Description |
InputAction |
action |
Action to perform rebinding on.
|
Returns
Declaration
public static void RemoveAllBindingOverrides(this InputAction action)
Parameters
Restore all bindings in the map to their defaults.
Declaration
public static void RemoveAllBindingOverrides(this InputActionMap actionMap)
Parameters
Type |
Name |
Description |
InputActionMap |
actionMap |
Action map to remove overrides from. Must not have enabled actions.
|
Declaration
public static void RemoveBindingOverride(this InputAction action, InputBinding bindingOverride)
Parameters
Declaration
public static void RemoveBindingOverrides(this InputActionMap actionMap, IEnumerable<InputBinding> overrides)
Parameters