Class MixedRealityInteractionMapping
Maps the capabilities of controllers, linking the Physical inputs of a controller to a Logical construct in a runtime project
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class MixedRealityInteractionMapping
Remarks
One definition should exist for each physical device input, such as buttons, triggers, joysticks, dpads, and more.
Constructors
MixedRealityInteractionMapping(MixedRealityInteractionMapping)
Declaration
public MixedRealityInteractionMapping(MixedRealityInteractionMapping mixedRealityInteractionMapping)
Parameters
Type | Name | Description |
---|---|---|
MixedRealityInteractionMapping | mixedRealityInteractionMapping |
MixedRealityInteractionMapping(UInt32, String, AxisType, DeviceInputType, KeyCode)
The constructor for a new Interaction Mapping definition
Declaration
public MixedRealityInteractionMapping(uint id, string description, AxisType axisType, DeviceInputType inputType, KeyCode keyCode)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | id | Identity for mapping |
String | description | The description of the interaction mapping. |
AxisType | axisType | The axis that the mapping operates on, also denotes the data type for the mapping |
DeviceInputType | inputType | The physical input device / control |
KeyCode | keyCode | Optional KeyCode value to get input from Unity's old input system |
MixedRealityInteractionMapping(UInt32, String, AxisType, DeviceInputType, MixedRealityInputAction, KeyCode, String, String, Boolean, Boolean)
The constructor for a new Interaction Mapping definition
Declaration
public MixedRealityInteractionMapping(uint id, string description, AxisType axisType, DeviceInputType inputType, MixedRealityInputAction inputAction, KeyCode keyCode = null, string axisCodeX = "", string axisCodeY = "", bool invertXAxis = false, bool invertYAxis = false)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | id | Identity for mapping |
String | description | The description of the interaction mapping. |
AxisType | axisType | The axis that the mapping operates on, also denotes the data type for the mapping |
DeviceInputType | inputType | The physical input device / control |
MixedRealityInputAction | inputAction | The logical MixedRealityInputAction that this input performs |
KeyCode | keyCode | Optional KeyCode value to get input from Unity's old input system |
String | axisCodeX | Optional horizontal or single axis value to get axis data from Unity's old input system. |
String | axisCodeY | Optional vertical axis value to get axis data from Unity's old input system. |
Boolean | invertXAxis | Optional horizontal axis invert option. |
Boolean | invertYAxis | Optional vertical axis invert option. |
MixedRealityInteractionMapping(UInt32, String, AxisType, DeviceInputType, String, String, Boolean, Boolean)
The constructor for a new Interaction Mapping definition
Declaration
public MixedRealityInteractionMapping(uint id, string description, AxisType axisType, DeviceInputType inputType, string axisCodeX = "", string axisCodeY = "", bool invertXAxis = false, bool invertYAxis = false)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | id | Identity for mapping |
String | description | The description of the interaction mapping. |
AxisType | axisType | The axis that the mapping operates on, also denotes the data type for the mapping |
DeviceInputType | inputType | The physical input device / control |
String | axisCodeX | Optional horizontal or single axis value to get axis data from Unity's old input system. |
String | axisCodeY | Optional vertical axis value to get axis data from Unity's old input system. |
Boolean | invertXAxis | Optional horizontal axis invert option. |
Boolean | invertYAxis | Optional vertical axis invert option. |
Properties
AxisCodeX
Optional horizontal or single axis value to get axis data from Unity's old input system.
Declaration
public string AxisCodeX { get; }
Property Value
Type | Description |
---|---|
String |
AxisCodeY
Optional vertical axis value to get axis data from Unity's old input system.
Declaration
public string AxisCodeY { get; }
Property Value
Type | Description |
---|---|
String |
AxisType
The axis type of the button, e.g. Analogue, Digital, etc.
Declaration
public AxisType AxisType { get; }
Property Value
Type | Description |
---|---|
AxisType |
BoolData
The Bool data value.
Declaration
public bool BoolData { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Only supported for a Digital mapping axis type
Changed
Has the value changed since the last reading.
Declaration
public bool Changed { get; }
Property Value
Type | Description |
---|---|
Boolean |
Description
The description of the interaction mapping.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
String |
FloatData
The Float data value.
Declaration
public float FloatData { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Only supported for a SingleAxis mapping axis type
Id
The Id assigned to the Interaction.
Declaration
public uint Id { get; }
Property Value
Type | Description |
---|---|
UInt32 |
InputType
The primary action of the input as defined by the controller SDK.
Declaration
public DeviceInputType InputType { get; }
Property Value
Type | Description |
---|---|
DeviceInputType |
InvertXAxis
Should the X axis be inverted?
Declaration
public bool InvertXAxis { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Only valid for SingleAxis and DualAxis inputs.
InvertYAxis
Should the Y axis be inverted?
Declaration
public bool InvertYAxis { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Only valid for DualAxis inputs.
KeyCode
Optional KeyCode value to get input from Unity's old input system.
Declaration
public KeyCode KeyCode { get; }
Property Value
Type | Description |
---|---|
KeyCode |
MixedRealityInputAction
Action to be raised to the Input Manager when the input data has changed.
Declaration
public MixedRealityInputAction MixedRealityInputAction { get; }
Property Value
Type | Description |
---|---|
MixedRealityInputAction |
PoseData
The Pose data value.
Declaration
public MixedRealityPose PoseData { get; set; }
Property Value
Type | Description |
---|---|
MixedRealityPose |
Remarks
Only supported for a SixDof mapping axis type
PositionData
The ThreeDof Vector3 Position data value.
Declaration
public Vector3 PositionData { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Only supported for a ThreeDof mapping axis type
RawData
The Raw (object) data value.
Declaration
public object RawData { get; set; }
Property Value
Type | Description |
---|---|
Object |
Remarks
Only supported for a Raw mapping axis type
RotationData
The ThreeDof Quaternion Rotation data value.
Declaration
public Quaternion RotationData { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
Remarks
Only supported for a ThreeDof mapping axis type
Vector2Data
The Vector2 data value.
Declaration
public Vector2 Vector2Data { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
Only supported for a DualAxis mapping axis type