docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRSimulatedController

    An input device representing a simulated XR handed controller.

    Inheritance
    object
    InputControl
    InputDevice
    TrackedDevice
    XRController
    XRSimulatedController
    Inherited Members
    XRController.leftHand
    XRController.rightHand
    TrackedDevice.trackingState
    TrackedDevice.isTracked
    TrackedDevice.devicePosition
    TrackedDevice.deviceRotation
    InputDevice.InvalidDeviceId
    InputDevice.description
    InputDevice.enabled
    InputDevice.canRunInBackground
    InputDevice.added
    InputDevice.remote
    InputDevice.native
    InputDevice.updateBeforeRender
    InputDevice.deviceId
    InputDevice.lastUpdateTime
    InputDevice.wasUpdatedThisFrame
    InputDevice.allControls
    InputDevice.valueType
    InputDevice.valueSizeInBytes
    InputDevice.ReadValueFromBufferAsObject(void*, int)
    InputDevice.ReadValueFromStateAsObject(void*)
    InputDevice.ReadValueFromStateIntoBuffer(void*, void*, int)
    InputDevice.CompareValue(void*, void*)
    InputDevice.MakeCurrent()
    InputDevice.OnAdded()
    InputDevice.OnRemoved()
    InputDevice.OnConfigurationChanged()
    InputDevice.ExecuteCommand<TCommand>(ref TCommand)
    InputControl.name
    InputControl.displayName
    InputControl.shortDisplayName
    InputControl.path
    InputControl.layout
    InputControl.variants
    InputControl.device
    InputControl.parent
    InputControl.children
    InputControl.usages
    InputControl.aliases
    InputControl.stateBlock
    InputControl.noisy
    InputControl.synthetic
    InputControl.this[string]
    InputControl.magnitude
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(void*)
    InputControl.WriteValueFromBufferIntoState(void*, int, void*)
    InputControl.WriteValueFromObjectIntoState(object, void*)
    InputControl.TryGetChildControl(string)
    InputControl.TryGetChildControl<TControl>(string)
    InputControl.GetChildControl(string)
    InputControl.GetChildControl<TControl>(string)
    InputControl.RefreshConfigurationIfNeeded()
    InputControl.RefreshConfiguration()
    InputControl.m_StateBlock
    InputControl.currentStatePtr
    InputControl.previousFrameStatePtr
    InputControl.defaultStatePtr
    InputControl.noiseMaskPtr
    InputControl.stateOffsetRelativeToDeviceRoot
    InputControl.optimizedControlDataType
    InputControl.CalculateOptimizedControlDataType()
    InputControl.ApplyParameterChanges()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [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
    long
    Overrides
    UnityEngine.InputSystem.InputDevice.ExecuteCommand(UnityEngine.InputSystem.LowLevel.InputDeviceCommand*)

    FinishSetup()

    Finishes setting up all the input values for the controller.

    Declaration
    protected override void FinishSetup()
    Overrides
    UnityEngine.InputSystem.XR.XRController.FinishSetup()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)