docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARBaseGestureInteractable

    Base class that manipulates an object via a gesture.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRBaseInteractable
    ARBaseGestureInteractable
    ARAnnotationInteractable
    ARPlacementInteractable
    ARRotationInteractable
    ARScaleInteractable
    ARSelectionInteractable
    ARTranslationInteractable
    Implements
    IXRActivateInteractable
    IXRHoverInteractable
    IXRSelectInteractable
    IXRFocusInteractable
    IXRInteractionStrengthInteractable
    IXRInteractable
    IXROverridesGazeAutoSelect
    Inherited Members
    XRBaseInteractable.registered
    XRBaseInteractable.unregistered
    XRBaseInteractable.getDistanceOverride
    XRBaseInteractable.interactionManager
    XRBaseInteractable.colliders
    XRBaseInteractable.interactionLayers
    XRBaseInteractable.distanceCalculationMode
    XRBaseInteractable.selectMode
    XRBaseInteractable.focusMode
    XRBaseInteractable.customReticle
    XRBaseInteractable.allowGazeInteraction
    XRBaseInteractable.allowGazeSelect
    XRBaseInteractable.overrideGazeTimeToSelect
    XRBaseInteractable.gazeTimeToSelect
    XRBaseInteractable.overrideTimeToAutoDeselectGaze
    XRBaseInteractable.timeToAutoDeselectGaze
    XRBaseInteractable.allowGazeAssistance
    XRBaseInteractable.firstHoverEntered
    XRBaseInteractable.lastHoverExited
    XRBaseInteractable.hoverEntered
    XRBaseInteractable.hoverExited
    XRBaseInteractable.firstSelectEntered
    XRBaseInteractable.lastSelectExited
    XRBaseInteractable.selectEntered
    XRBaseInteractable.selectExited
    XRBaseInteractable.firstFocusEntered
    XRBaseInteractable.lastFocusExited
    XRBaseInteractable.focusEntered
    XRBaseInteractable.focusExited
    XRBaseInteractable.activated
    XRBaseInteractable.deactivated
    XRBaseInteractable.interactorsHovering
    XRBaseInteractable.isHovered
    XRBaseInteractable.interactorsSelecting
    XRBaseInteractable.firstInteractorSelecting
    XRBaseInteractable.isSelected
    XRBaseInteractable.interactionGroupsFocusing
    XRBaseInteractable.firstInteractionGroupFocusing
    XRBaseInteractable.isFocused
    XRBaseInteractable.canFocus
    XRBaseInteractable.startingHoverFilters
    XRBaseInteractable.hoverFilters
    XRBaseInteractable.startingSelectFilters
    XRBaseInteractable.selectFilters
    XRBaseInteractable.startingInteractionStrengthFilters
    XRBaseInteractable.interactionStrengthFilters
    XRBaseInteractable.largestInteractionStrength
    XRBaseInteractable.Reset()
    XRBaseInteractable.OnDisable()
    XRBaseInteractable.OnDestroy()
    XRBaseInteractable.GetAttachTransform(IXRInteractor)
    XRBaseInteractable.GetAttachPoseOnSelect(IXRSelectInteractor)
    XRBaseInteractable.GetLocalAttachPoseOnSelect(IXRSelectInteractor)
    XRBaseInteractable.GetDistanceSqrToInteractor(IXRInteractor)
    XRBaseInteractable.GetDistance(Vector3)
    XRBaseInteractable.GetInteractionStrength(IXRInteractor)
    XRBaseInteractable.IsHovered(IXRHoverInteractor)
    XRBaseInteractable.IsSelected(IXRSelectInteractor)
    XRBaseInteractable.IsHovered(IXRInteractor)
    XRBaseInteractable.IsSelected(IXRInteractor)
    XRBaseInteractable.GetCustomReticle(IXRInteractor)
    XRBaseInteractable.AttachCustomReticle(IXRInteractor)
    XRBaseInteractable.RemoveCustomReticle(IXRInteractor)
    XRBaseInteractable.CaptureAttachPose(IXRSelectInteractor)
    XRBaseInteractable.ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractable.OnHoverEntering(HoverEnterEventArgs)
    XRBaseInteractable.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractable.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractable.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractable.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractable.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractable.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractable.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractable.OnFocusEntering(FocusEnterEventArgs)
    XRBaseInteractable.OnFocusEntered(FocusEnterEventArgs)
    XRBaseInteractable.OnFocusExiting(FocusExitEventArgs)
    XRBaseInteractable.OnFocusExited(FocusExitEventArgs)
    XRBaseInteractable.OnActivated(ActivateEventArgs)
    XRBaseInteractable.OnDeactivated(DeactivateEventArgs)
    XRBaseInteractable.ProcessInteractionStrength(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractable.ProcessHoverFilters(IXRHoverInteractor)
    XRBaseInteractable.ProcessSelectFilters(IXRSelectInteractor)
    XRBaseInteractable.ProcessInteractionStrengthFilters(IXRInteractor, float)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.AR
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public abstract class ARBaseGestureInteractable : XRBaseInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect

    Properties

    excludeUITouches

    When true, will exclude touches that are over UI. Used to make screen space canvas elements block touches from hitting planes behind it.

    Declaration
    public bool excludeUITouches { get; set; }
    Property Value
    Type Description
    bool
    See Also
    IsPointerOverGameObject(int)

    gestureInteractor

    The ARGestureInteractor that this Interactable listens to for gestures when connected.

    Declaration
    protected ARGestureInteractor gestureInteractor { get; }
    Property Value
    Type Description
    ARGestureInteractor
    See Also
    ConnectGestureInteractor()
    DisconnectGestureInteractor()

    xrOrigin

    The Unity.XR.CoreUtils.XROrigin that this Interactable will use (such as to get the Camera or to transform from Session space). Will find one if null.

    Declaration
    public XROrigin xrOrigin { get; set; }
    Property Value
    Type Description
    XROrigin

    Methods

    Awake()

    See MonoBehaviour.

    Declaration
    protected override void Awake()
    Overrides
    XRBaseInteractable.Awake()

    CanStartManipulationForGesture(DragGesture)

    Determines if the manipulation can start for the given gesture.

    Declaration
    protected virtual bool CanStartManipulationForGesture(DragGesture gesture)
    Parameters
    Type Name Description
    DragGesture gesture

    The current gesture.

    Returns
    Type Description
    bool

    Returns true if the manipulation can start. Otherwise, returns false.

    CanStartManipulationForGesture(PinchGesture)

    Determines if the manipulation can start for the given gesture.

    Declaration
    protected virtual bool CanStartManipulationForGesture(PinchGesture gesture)
    Parameters
    Type Name Description
    PinchGesture gesture

    The current gesture.

    Returns
    Type Description
    bool

    Returns true if the manipulation can start. Otherwise, returns false.

    CanStartManipulationForGesture(TapGesture)

    Determines if the manipulation can start for the given gesture.

    Declaration
    protected virtual bool CanStartManipulationForGesture(TapGesture gesture)
    Parameters
    Type Name Description
    TapGesture gesture

    The current gesture.

    Returns
    Type Description
    bool

    Returns true if the manipulation can start. Otherwise, returns false.

    CanStartManipulationForGesture(TwistGesture)

    Determines if the manipulation can start for the given gesture.

    Declaration
    protected virtual bool CanStartManipulationForGesture(TwistGesture gesture)
    Parameters
    Type Name Description
    TwistGesture gesture

    The current gesture.

    Returns
    Type Description
    bool

    Returns true if the manipulation can start. Otherwise, returns false.

    CanStartManipulationForGesture(TwoFingerDragGesture)

    Determines if the manipulation can start for the given gesture.

    Declaration
    protected virtual bool CanStartManipulationForGesture(TwoFingerDragGesture gesture)
    Parameters
    Type Name Description
    TwoFingerDragGesture gesture

    The current gesture.

    Returns
    Type Description
    bool

    Returns true if the manipulation can start. Otherwise, returns false.

    ConnectGestureInteractor()

    Connect an ARGestureInteractor's gestures to this interactable.

    Declaration
    protected virtual void ConnectGestureInteractor()

    DisconnectGestureInteractor()

    Disconnect an ARGestureInteractor's gestures from this interactable.

    Declaration
    protected virtual void DisconnectGestureInteractor()

    IsGameObjectSelected()

    Determines if the ARGestureInteractor is selecting the GameObject this Interactable is attached to.

    Declaration
    protected virtual bool IsGameObjectSelected()
    Returns
    Type Description
    bool

    Returns if the Gesture Interactor is selecting the GameObject this Interactable is attached to. Otherwise, returns .

    IsHoverableBy(IXRHoverInteractor)

    Determines if a given Interactor can hover over this Interactable.

    Declaration
    public override bool IsHoverableBy(IXRHoverInteractor interactor)
    Parameters
    Type Name Description
    IXRHoverInteractor interactor

    Interactor to check for a valid hover state with.

    Returns
    Type Description
    bool

    Returns true if hovering is valid this frame. Returns false if not.

    Overrides
    XRBaseInteractable.IsHoverableBy(IXRHoverInteractor)
    See Also
    CanHover(IXRHoverInteractable)

    IsSelectableBy(IXRSelectInteractor)

    Determines if a given Interactor can select this Interactable.

    Declaration
    public override bool IsSelectableBy(IXRSelectInteractor interactor)
    Parameters
    Type Name Description
    IXRSelectInteractor interactor

    Interactor to check for a valid selection with.

    Returns
    Type Description
    bool

    Returns true if selection is valid this frame. Returns false if not.

    Overrides
    XRBaseInteractable.IsSelectableBy(IXRSelectInteractor)
    See Also
    CanSelect(IXRSelectInteractable)

    OnContinueManipulation(DragGesture)

    Unity calls this method automatically when the manipulation continues.

    Declaration
    protected virtual void OnContinueManipulation(DragGesture gesture)
    Parameters
    Type Name Description
    DragGesture gesture

    The current gesture.

    See Also
    onUpdated

    OnContinueManipulation(PinchGesture)

    Unity calls this method automatically when the manipulation continues.

    Declaration
    protected virtual void OnContinueManipulation(PinchGesture gesture)
    Parameters
    Type Name Description
    PinchGesture gesture

    The current gesture.

    See Also
    onUpdated

    OnContinueManipulation(TapGesture)

    Unity calls this method automatically when the manipulation continues.

    Declaration
    protected virtual void OnContinueManipulation(TapGesture gesture)
    Parameters
    Type Name Description
    TapGesture gesture

    The current gesture.

    See Also
    onUpdated

    OnContinueManipulation(TwistGesture)

    Unity calls this method automatically when the manipulation continues.

    Declaration
    protected virtual void OnContinueManipulation(TwistGesture gesture)
    Parameters
    Type Name Description
    TwistGesture gesture

    The current gesture.

    See Also
    onUpdated

    OnContinueManipulation(TwoFingerDragGesture)

    Unity calls this method automatically when the manipulation continues.

    Declaration
    protected virtual void OnContinueManipulation(TwoFingerDragGesture gesture)
    Parameters
    Type Name Description
    TwoFingerDragGesture gesture

    The current gesture.

    See Also
    onUpdated

    OnEnable()

    See MonoBehaviour.

    Declaration
    protected override void OnEnable()
    Overrides
    XRBaseInteractable.OnEnable()

    OnEndManipulation(DragGesture)

    Unity calls this method automatically when the manipulation ends.

    Declaration
    protected virtual void OnEndManipulation(DragGesture gesture)
    Parameters
    Type Name Description
    DragGesture gesture

    The current gesture.

    See Also
    onFinished

    OnEndManipulation(PinchGesture)

    Unity calls this method automatically when the manipulation ends.

    Declaration
    protected virtual void OnEndManipulation(PinchGesture gesture)
    Parameters
    Type Name Description
    PinchGesture gesture

    The current gesture.

    See Also
    onFinished

    OnEndManipulation(TapGesture)

    Unity calls this method automatically when the manipulation ends.

    Declaration
    protected virtual void OnEndManipulation(TapGesture gesture)
    Parameters
    Type Name Description
    TapGesture gesture

    The current gesture.

    See Also
    onFinished

    OnEndManipulation(TwistGesture)

    Unity calls this method automatically when the manipulation ends.

    Declaration
    protected virtual void OnEndManipulation(TwistGesture gesture)
    Parameters
    Type Name Description
    TwistGesture gesture

    The current gesture.

    See Also
    onFinished

    OnEndManipulation(TwoFingerDragGesture)

    Unity calls this method automatically when the manipulation ends.

    Declaration
    protected virtual void OnEndManipulation(TwoFingerDragGesture gesture)
    Parameters
    Type Name Description
    TwoFingerDragGesture gesture

    The current gesture.

    See Also
    onFinished

    OnRegistered(InteractableRegisteredEventArgs)

    The XRInteractionManager calls this method when this Interactable is registered with it.

    Declaration
    protected override void OnRegistered(InteractableRegisteredEventArgs args)
    Parameters
    Type Name Description
    InteractableRegisteredEventArgs args

    Event data containing the Interaction Manager that registered this Interactable.

    Overrides
    XRBaseInteractable.OnRegistered(InteractableRegisteredEventArgs)
    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    RegisterInteractable(IXRInteractable)

    OnStartManipulation(DragGesture)

    Unity calls this method automatically when the manipulation starts.

    Declaration
    protected virtual void OnStartManipulation(DragGesture gesture)
    Parameters
    Type Name Description
    DragGesture gesture

    The current gesture.

    See Also
    onGestureStarted

    OnStartManipulation(PinchGesture)

    Unity calls this method automatically when the manipulation starts.

    Declaration
    protected virtual void OnStartManipulation(PinchGesture gesture)
    Parameters
    Type Name Description
    PinchGesture gesture

    The current gesture.

    See Also
    onGestureStarted

    OnStartManipulation(TapGesture)

    Unity calls this method automatically when the manipulation starts.

    Declaration
    protected virtual void OnStartManipulation(TapGesture gesture)
    Parameters
    Type Name Description
    TapGesture gesture

    The current gesture.

    See Also
    onGestureStarted

    OnStartManipulation(TwistGesture)

    Unity calls this method automatically when the manipulation starts.

    Declaration
    protected virtual void OnStartManipulation(TwistGesture gesture)
    Parameters
    Type Name Description
    TwistGesture gesture

    The current gesture.

    See Also
    onGestureStarted

    OnStartManipulation(TwoFingerDragGesture)

    Unity calls this method automatically when the manipulation starts.

    Declaration
    protected virtual void OnStartManipulation(TwoFingerDragGesture gesture)
    Parameters
    Type Name Description
    TwoFingerDragGesture gesture

    The current gesture.

    See Also
    onGestureStarted

    OnUnregistered(InteractableUnregisteredEventArgs)

    The XRInteractionManager calls this method when this Interactable is unregistered from it.

    Declaration
    protected override void OnUnregistered(InteractableUnregisteredEventArgs args)
    Parameters
    Type Name Description
    InteractableUnregisteredEventArgs args

    Event data containing the Interaction Manager that unregistered this Interactable.

    Overrides
    XRBaseInteractable.OnUnregistered(InteractableUnregisteredEventArgs)
    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    UnregisterInteractable(IXRInteractable)

    Implements

    IXRActivateInteractable
    IXRHoverInteractable
    IXRSelectInteractable
    IXRFocusInteractable
    IXRInteractionStrengthInteractable
    IXRInteractable
    IXROverridesGazeAutoSelect

    Extension Methods

    XRFocusInteractableExtensions.GetOldestInteractorFocusing(IXRFocusInteractable)
    XRHoverInteractableExtensions.GetOldestInteractorHovering(IXRHoverInteractable)
    XRSelectInteractableExtensions.GetOldestInteractorSelecting(IXRSelectInteractable)
    In This Article
    Back to top
    Copyright © 2024 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)