docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TouchscreenGestureInputController

    An input device representing mobile 2D screen gestures.

    Inheritance
    object
    InputControl
    InputDevice
    TrackedDevice
    XRController
    TouchscreenGestureInputController
    Implements
    IInputUpdateCallbackReceiver
    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.OnConfigurationChanged()
    InputDevice.ExecuteCommand<TCommand>(ref TCommand)
    InputDevice.ExecuteCommand(InputDeviceCommand*)
    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.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.AR.Inputs
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [Preserve]
    public class TouchscreenGestureInputController : XRController, IInputUpdateCallbackReceiver

    Properties

    dragCurrentPosition

    The current screen position of the drag gesture.

    Declaration
    public Vector2Control dragCurrentPosition { get; }
    Property Value
    Type Description
    Vector2Control

    dragDelta

    The delta screen position of the drag gesture.

    Declaration
    public Vector2Control dragDelta { get; }
    Property Value
    Type Description
    Vector2Control

    dragStartPosition

    The screen position where the drag gesture started.

    Declaration
    public Vector2Control dragStartPosition { get; }
    Property Value
    Type Description
    Vector2Control

    fingerCount

    The number of fingers on the touchscreen.

    Declaration
    public IntegerControl fingerCount { get; }
    Property Value
    Type Description
    IntegerControl

    pinchGap

    The gap between then position of the first and second fingers for the pinch gesture.

    Declaration
    public AxisControl pinchGap { get; }
    Property Value
    Type Description
    AxisControl

    pinchGapDelta

    The gap delta between then position of the first and second fingers for the pinch gesture.

    Declaration
    public AxisControl pinchGapDelta { get; }
    Property Value
    Type Description
    AxisControl

    pinchStartPosition1

    The screen position of the first finger where the pinch gesture started.

    Declaration
    public Vector2Control pinchStartPosition1 { get; }
    Property Value
    Type Description
    Vector2Control

    pinchStartPosition2

    The screen position of the second finger where the pinch gesture started.

    Declaration
    public Vector2Control pinchStartPosition2 { get; }
    Property Value
    Type Description
    Vector2Control

    tapStartPosition

    The screen position where the tap gesture started.

    Declaration
    public Vector2Control tapStartPosition { get; }
    Property Value
    Type Description
    Vector2Control

    twistDeltaRotation

    The delta rotation of the twist gesture.

    Declaration
    public AxisControl twistDeltaRotation { get; }
    Property Value
    Type Description
    AxisControl

    twistStartPosition1

    The screen position of the first finger where the twist gesture started.

    Declaration
    public Vector2Control twistStartPosition1 { get; }
    Property Value
    Type Description
    Vector2Control

    twistStartPosition2

    The screen position of the second finger where the twist gesture started.

    Declaration
    public Vector2Control twistStartPosition2 { get; }
    Property Value
    Type Description
    Vector2Control

    twoFingerDragCurrentPosition

    The current screen position of the two-finger drag gesture.

    Declaration
    public Vector2Control twoFingerDragCurrentPosition { get; }
    Property Value
    Type Description
    Vector2Control

    twoFingerDragDelta

    The delta screen position of the two-finger drag gesture.

    Declaration
    public Vector2Control twoFingerDragDelta { get; }
    Property Value
    Type Description
    Vector2Control

    twoFingerDragStartPosition1

    The screen position of the first finger where the two-finger drag gesture started.

    Declaration
    public Vector2Control twoFingerDragStartPosition1 { get; }
    Property Value
    Type Description
    Vector2Control

    twoFingerDragStartPosition2

    The screen position of the second finger where the two-finger drag gesture started.

    Declaration
    public Vector2Control twoFingerDragStartPosition2 { get; }
    Property Value
    Type Description
    Vector2Control

    Methods

    FinishSetup()

    Finishes setting up all the input values for the controller.

    Declaration
    protected override void FinishSetup()
    Overrides
    UnityEngine.InputSystem.XR.XRController.FinishSetup()

    OnAdded()

    Called by the system when the device is added to UnityEngine.InputSystem.InputSystem.devices.

    Declaration
    protected override void OnAdded()
    Overrides
    UnityEngine.InputSystem.InputDevice.OnAdded()
    Remarks

    This is called after the device has already been added.

    See Also
    devices
    Added
    OnRemoved()

    OnRemoved()

    Called by the system when the device is removed from UnityEngine.InputSystem.InputSystem.devices.

    Declaration
    protected override void OnRemoved()
    Overrides
    UnityEngine.InputSystem.InputDevice.OnRemoved()
    Remarks

    This is called after the device has already been removed.

    See Also
    devices
    Removed
    OnRemoved()

    OnUpdate()

    Declaration
    public void OnUpdate()

    ToString()

    Converts state data to a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    Returns a string representation.

    Overrides
    UnityEngine.InputSystem.InputControl.ToString()

    Implements

    UnityEngine.InputSystem.LowLevel.IInputUpdateCallbackReceiver
    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)