Class InputMappingAxisUtility
Utility class for Unity's Input Manager mappings.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input.Editor
Assembly: cs.temp.dll.dll
Syntax
public static class InputMappingAxisUtility
Methods
CheckUnityInputManagerMappings(InputManagerAxis[], Boolean)
Simple static function to check Unity InputManager Axis configuration, and apply if needed.
Declaration
public static bool CheckUnityInputManagerMappings(InputManagerAxis[] axisMappings, bool updateMappings = true)
Parameters
Type | Name | Description |
---|---|---|
InputManagerAxis[] | axisMappings | Array of axis mappings, to configure your own custom set. |
Boolean | updateMappings | If the mappings should be updated to match axisMappings or simply check that they match. Defaults to true. |
Returns
Type | Description |
---|---|
Boolean | True if the mappings needed an update. False if they match axisMappings already. |
Remarks
This only exists as the Unity input manager CANNOT map Axis to an id; it has to be through a mapping.
DoesAxisNameExist(String)
Checks our local cache of axis names to see if an axis exists. This cache is refreshed if it's empty or if InputManager.asset has been changed.
Declaration
public static bool DoesAxisNameExist(string axisName)
Parameters
Type | Name | Description |
---|---|---|
String | axisName |
Returns
Type | Description |
---|---|
Boolean |
RemoveMappings(InputManagerAxis[])
Simple static function to apply Unity InputManager Axis configuration
Declaration
public static void RemoveMappings(InputManagerAxis[] axisMappings)
Parameters
Type | Name | Description |
---|---|---|
InputManagerAxis[] | axisMappings | Optional array of Axis Mappings, to configure your own custom set |
Remarks
This only exists as the Unity input manager CANNOT map Axis to an id, it has to be through a mapping