Class XRSimulatedController
An input device representing a simulated XR handed controller.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
Syntax
[InputControlLayout(stateType = typeof(XRSimulatedControllerState), commonUsages = new string[]{"LeftHand", "RightHand"}, isGenericTypeOfDevice = false, displayName = "XR Simulated Controller", updateBeforeRender = true)]
[Preserve]
public class XRSimulatedController : XRController
Properties
batteryLevel
Value representing the current battery life of this device.
Declaration
public AxisControl batteryLevel { get; }
Property Value
Type | Description |
---|---|
AxisControl |
grip
Represents the users grip on the controller.
Declaration
public AxisControl grip { get; }
Property Value
Type | Description |
---|---|
AxisControl |
gripButton
A binary measure of whether the device is being gripped.
Declaration
public ButtonControl gripButton { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
menuButton
Represents a menu button, used to pause, go back, or otherwise exit gameplay.
Declaration
public ButtonControl menuButton { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
primary2DAxis
The primary touchpad or joystick on a device.
Declaration
public Vector2Control primary2DAxis { get; }
Property Value
Type | Description |
---|---|
Vector2Control |
primary2DAxisClick
Represents the primary 2D axis being clicked or otherwise depressed.
Declaration
public ButtonControl primary2DAxisClick { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
primary2DAxisTouch
Represents the primary 2D axis being touched.
Declaration
public ButtonControl primary2DAxisTouch { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
primaryButton
The primary face button being pressed on a device, or sole button if only one is available.
Declaration
public ButtonControl primaryButton { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
primaryTouch
The primary face button being touched on a device.
Declaration
public ButtonControl primaryTouch { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
secondary2DAxis
A secondary touchpad or joystick on a device.
Declaration
public Vector2Control secondary2DAxis { get; }
Property Value
Type | Description |
---|---|
Vector2Control |
secondary2DAxisClick
Represents the secondary 2D axis being clicked or otherwise depressed.
Declaration
public ButtonControl secondary2DAxisClick { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
secondary2DAxisTouch
Represents the secondary 2D axis being touched.
Declaration
public ButtonControl secondary2DAxisTouch { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
secondaryButton
The secondary face button being pressed on a device.
Declaration
public ButtonControl secondaryButton { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
secondaryTouch
The secondary face button being touched on a device.
Declaration
public ButtonControl secondaryTouch { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
trigger
A trigger-like control, pressed with the index finger.
Declaration
public AxisControl trigger { get; }
Property Value
Type | Description |
---|---|
AxisControl |
triggerButton
A binary measure of whether the index finger is activating the trigger.
Declaration
public ButtonControl triggerButton { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
userPresence
Indicates whether the user is present and interacting with the device.
Declaration
public ButtonControl userPresence { get; }
Property Value
Type | Description |
---|---|
ButtonControl |
Methods
ExecuteCommand(InputDeviceCommand*)
Declaration
protected override long ExecuteCommand(InputDeviceCommand*commandPtr)
Parameters
Type | Name | Description |
---|---|---|
InputDeviceCommand* | commandPtr |
Returns
Type | Description |
---|---|
Int64 |
Overrides
FinishSetup()
Finishes setting up all the input values for the controller.
Declaration
protected override void FinishSetup()