docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRBaseControllerInteractor

    Abstract base class from which all interactors that are controller-driven derive. This class hooks into the interaction system (via XRInteractionManager) and provides base virtual methods for handling hover and selection. Additionally, this class provides functionality for checking the controller's selection status and hiding the controller on selection.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRBaseInteractor
    XRBaseControllerInteractor
    XRDirectInteractor
    XRRayInteractor
    Implements
    IXRHoverInteractor
    IXRSelectInteractor
    IXRTargetPriorityInteractor
    IXRGroupMember
    IXRInteractionStrengthInteractor
    IXRActivateInteractor
    IXRInteractor
    Inherited Members
    XRBaseInteractor.registered
    XRBaseInteractor.unregistered
    XRBaseInteractor.interactionManager
    XRBaseInteractor.containingGroup
    XRBaseInteractor.interactionLayers
    XRBaseInteractor.attachTransform
    XRBaseInteractor.keepSelectedTargetValid
    XRBaseInteractor.disableVisualsWhenBlockedInGroup
    XRBaseInteractor.startingSelectedInteractable
    XRBaseInteractor.startingTargetFilter
    XRBaseInteractor.hoverEntered
    XRBaseInteractor.hoverExited
    XRBaseInteractor.selectEntered
    XRBaseInteractor.selectExited
    XRBaseInteractor.targetFilter
    XRBaseInteractor.allowHover
    XRBaseInteractor.allowSelect
    XRBaseInteractor.isPerformingManualInteraction
    XRBaseInteractor.interactablesHovered
    XRBaseInteractor.hasHover
    XRBaseInteractor.interactablesSelected
    XRBaseInteractor.firstInteractableSelected
    XRBaseInteractor.hasSelection
    XRBaseInteractor.startingHoverFilters
    XRBaseInteractor.hoverFilters
    XRBaseInteractor.startingSelectFilters
    XRBaseInteractor.selectFilters
    XRBaseInteractor.largestInteractionStrength
    XRBaseInteractor.Reset()
    XRBaseInteractor.OnEnable()
    XRBaseInteractor.OnDisable()
    XRBaseInteractor.Start()
    XRBaseInteractor.OnDestroy()
    XRBaseInteractor.GetAttachTransform(IXRInteractable)
    XRBaseInteractor.GetAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.GetLocalAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.GetValidTargets(List<IXRInteractable>)
    XRBaseInteractor.isHoverActive
    XRBaseInteractor.targetsForSelection
    XRBaseInteractor.CanHover(IXRHoverInteractable)
    XRBaseInteractor.CanSelect(IXRSelectInteractable)
    XRBaseInteractor.IsHovering(IXRHoverInteractable)
    XRBaseInteractor.IsSelecting(IXRSelectInteractable)
    XRBaseInteractor.IsHovering(IXRInteractable)
    XRBaseInteractor.IsSelecting(IXRInteractable)
    XRBaseInteractor.selectedInteractableMovementTypeOverride
    XRBaseInteractor.CaptureAttachPose(IXRSelectInteractable)
    XRBaseInteractor.CreateAttachTransform()
    XRBaseInteractor.GetInteractionStrength(IXRInteractable)
    XRBaseInteractor.OnRegistered(InteractorRegisteredEventArgs)
    XRBaseInteractor.OnUnregistered(InteractorUnregisteredEventArgs)
    XRBaseInteractor.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractor.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractor.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractor.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractor.ProcessInteractionStrength(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractor.StartManualInteraction(IXRSelectInteractable)
    XRBaseInteractor.EndManualInteraction()
    XRBaseInteractor.ProcessHoverFilters(IXRHoverInteractable)
    XRBaseInteractor.ProcessSelectFilters(IXRSelectInteractable)
    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
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public abstract class XRBaseControllerInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRActivateInteractor, IXRInteractor

    Properties

    allowActivate

    Defines whether this interactor allows sending activate and deactivate events.

    Declaration
    public bool allowActivate { get; set; }
    Property Value
    Type Description
    bool
    See Also
    allowHoveredActivate
    shouldActivate
    shouldDeactivate

    allowHoverAudioWhileSelecting

    Controls whether Unity allows playing an AudioClip from a Hover event if the Hovered Interactable is currently Selected by this Interactor.

    Declaration
    public bool allowHoverAudioWhileSelecting { get; set; }
    Property Value
    Type Description
    bool
    See Also
    playAudioClipOnHoverEntered
    playAudioClipOnHoverExited
    playAudioClipOnHoverCanceled

    allowHoverHapticsWhileSelecting

    Controls whether Unity allows playing haptics from a Hover event if the Hovered Interactable is currently Selected by this Interactor.

    Declaration
    public bool allowHoverHapticsWhileSelecting { get; set; }
    Property Value
    Type Description
    bool
    See Also
    playHapticsOnHoverEntered
    playHapticsOnHoverExited
    playHapticsOnHoverCanceled

    allowHoveredActivate

    Controls whether to send activate and deactivate events to interactables that this interactor is hovered over but not selected when there is no current selection. By default, the interactor will only send activate and deactivate events to interactables that it's selected.

    Declaration
    public bool allowHoveredActivate { get; set; }
    Property Value
    Type Description
    bool
    See Also
    allowActivate
    GetActivateTargets(List<IXRActivateInteractable>)

    audioClipForOnHoverCanceled

    The AudioClip Unity plays on Hover Canceled.

    Declaration
    public AudioClip audioClipForOnHoverCanceled { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnHoverCanceled

    audioClipForOnHoverEntered

    The AudioClip Unity plays on Hover Entered.

    Declaration
    public AudioClip audioClipForOnHoverEntered { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnHoverEntered

    audioClipForOnHoverExited

    The AudioClip Unity plays on Hover Exited.

    Declaration
    public AudioClip audioClipForOnHoverExited { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnHoverExited

    audioClipForOnSelectCanceled

    The AudioClip Unity plays on Select Canceled.

    Declaration
    public AudioClip audioClipForOnSelectCanceled { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnSelectCanceled

    audioClipForOnSelectEntered

    The AudioClip Unity plays on Select Entered.

    Declaration
    public AudioClip audioClipForOnSelectEntered { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnSelectEntered

    audioClipForOnSelectExited

    The AudioClip Unity plays on Select Exited.

    Declaration
    public AudioClip audioClipForOnSelectExited { get; set; }
    Property Value
    Type Description
    AudioClip
    See Also
    playAudioClipOnSelectExited

    hapticHoverCancelDuration

    The Haptics duration (in seconds) Unity plays on Hover Canceled.

    Declaration
    public float hapticHoverCancelDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverCancelIntensity
    playHapticsOnHoverCanceled

    hapticHoverCancelIntensity

    The Haptics intensity Unity plays on Hover Canceled.

    Declaration
    public float hapticHoverCancelIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverCancelDuration
    playHapticsOnHoverCanceled

    hapticHoverEnterDuration

    The Haptics duration (in seconds) Unity plays on Hover Entered.

    Declaration
    public float hapticHoverEnterDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverEnterIntensity
    playHapticsOnHoverEntered

    hapticHoverEnterIntensity

    The Haptics intensity Unity plays on Hover Entered.

    Declaration
    public float hapticHoverEnterIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverEnterDuration
    playHapticsOnHoverEntered

    hapticHoverExitDuration

    The Haptics duration (in seconds) Unity plays on Hover Exited.

    Declaration
    public float hapticHoverExitDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverExitIntensity
    playHapticsOnHoverExited

    hapticHoverExitIntensity

    The Haptics intensity Unity plays on Hover Exited.

    Declaration
    public float hapticHoverExitIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticHoverExitDuration
    playHapticsOnHoverExited

    hapticSelectCancelDuration

    The Haptics duration (in seconds) Unity plays on Select Canceled.

    Declaration
    public float hapticSelectCancelDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectCancelIntensity
    playHapticsOnSelectCanceled

    hapticSelectCancelIntensity

    The Haptics intensity Unity plays on Select Canceled.

    Declaration
    public float hapticSelectCancelIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectCancelDuration
    playHapticsOnSelectCanceled

    hapticSelectEnterDuration

    The Haptics duration (in seconds) Unity plays on Select Entered.

    Declaration
    public float hapticSelectEnterDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectEnterIntensity
    playHapticsOnSelectEntered

    hapticSelectEnterIntensity

    The Haptics intensity Unity plays on Select Entered.

    Declaration
    public float hapticSelectEnterIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectEnterDuration
    playHapticsOnSelectEntered

    hapticSelectExitDuration

    The Haptics duration (in seconds) Unity plays on Select Exited.

    Declaration
    public float hapticSelectExitDuration { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectExitIntensity
    playHapticsOnSelectExited

    hapticSelectExitIntensity

    The Haptics intensity Unity plays on Select Exited.

    Declaration
    public float hapticSelectExitIntensity { get; set; }
    Property Value
    Type Description
    float
    See Also
    hapticSelectExitDuration
    playHapticsOnSelectExited

    hideControllerOnSelect

    Controls whether this Interactor should hide the controller model on selection.

    Declaration
    public bool hideControllerOnSelect { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hideControllerModel

    isSelectActive

    (Read Only) Indicates whether this Interactor is in a state where it could select.

    Declaration
    public override bool isSelectActive { get; }
    Property Value
    Type Description
    bool
    Overrides
    XRBaseInteractor.isSelectActive

    isUISelectActive

    (Read Only) Whether or not Unity considers the UI Press controller input pressed.

    Declaration
    protected virtual bool isUISelectActive { get; }
    Property Value
    Type Description
    bool

    Returns true if active. Otherwise, returns false.

    playAudioClipOnHoverCanceled

    Controls whether Unity plays an AudioClip on Hover Canceled.

    Declaration
    public bool playAudioClipOnHoverCanceled { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnHoverCanceled

    playAudioClipOnHoverEntered

    Controls whether Unity plays an AudioClip on Hover Entered.

    Declaration
    public bool playAudioClipOnHoverEntered { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnHoverEntered

    playAudioClipOnHoverExited

    Controls whether Unity plays an AudioClip on Hover Exited.

    Declaration
    public bool playAudioClipOnHoverExited { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnHoverExited

    playAudioClipOnSelectCanceled

    Controls whether Unity plays an AudioClip on Select Canceled.

    Declaration
    public bool playAudioClipOnSelectCanceled { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnSelectCanceled

    playAudioClipOnSelectEntered

    Controls whether Unity plays an AudioClip on Select Entered.

    Declaration
    public bool playAudioClipOnSelectEntered { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnSelectEntered

    playAudioClipOnSelectExited

    Controls whether Unity plays an AudioClip on Select Exited.

    Declaration
    public bool playAudioClipOnSelectExited { get; set; }
    Property Value
    Type Description
    bool
    See Also
    audioClipForOnSelectExited

    playHapticsOnHoverCanceled

    Controls whether Unity plays haptics on Hover Canceled.

    Declaration
    public bool playHapticsOnHoverCanceled { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticHoverCancelIntensity
    hapticHoverCancelDuration

    playHapticsOnHoverEntered

    Controls whether Unity plays haptics on Hover Entered.

    Declaration
    public bool playHapticsOnHoverEntered { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticHoverEnterIntensity
    hapticHoverEnterDuration

    playHapticsOnHoverExited

    Controls whether Unity plays haptics on Hover Exited.

    Declaration
    public bool playHapticsOnHoverExited { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticHoverExitIntensity
    hapticHoverExitDuration

    playHapticsOnSelectCanceled

    Controls whether Unity plays haptics on Select Canceled.

    Declaration
    public bool playHapticsOnSelectCanceled { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticSelectCancelIntensity
    hapticSelectCancelDuration

    playHapticsOnSelectEntered

    Controls whether Unity plays haptics on Select Entered.

    Declaration
    public bool playHapticsOnSelectEntered { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticSelectEnterIntensity
    hapticSelectEnterDuration

    playHapticsOnSelectExited

    Controls whether Unity plays haptics on Select Exited.

    Declaration
    public bool playHapticsOnSelectExited { get; set; }
    Property Value
    Type Description
    bool
    See Also
    hapticSelectExitIntensity
    hapticSelectExitDuration

    selectActionTrigger

    Choose how Unity interprets the select input action from the controller. Controls between different input styles for determining if this Interactor can select, such as whether the button is currently pressed or just toggles the active state.

    Declaration
    public XRBaseControllerInteractor.InputTriggerType selectActionTrigger { get; set; }
    Property Value
    Type Description
    XRBaseControllerInteractor.InputTriggerType
    See Also
    XRBaseControllerInteractor.InputTriggerType
    isSelectActive

    shouldActivate

    (Read Only) Indicates whether this interactor is in a state where it should send the activate event this frame.

    Declaration
    public virtual bool shouldActivate { get; }
    Property Value
    Type Description
    bool

    shouldDeactivate

    (Read Only) Indicates whether this interactor is in a state where it should send the deactivate event this frame.

    Declaration
    public virtual bool shouldDeactivate { get; }
    Property Value
    Type Description
    bool

    targetPriorityMode

    Specifies how many Interactables should be monitored in the targetsForSelection property.

    Declaration
    public override TargetPriorityMode targetPriorityMode { get; set; }
    Property Value
    Type Description
    TargetPriorityMode
    Overrides
    XRBaseInteractor.targetPriorityMode

    uiScrollValue

    (Read Only) The current scroll value Unity would apply to the UI.

    Declaration
    protected Vector2 uiScrollValue { get; }
    Property Value
    Type Description
    Vector2

    Returns a Vector2 with scroll strength for each axis.

    xrController

    The controller instance that is queried for input.

    Declaration
    public XRBaseController xrController { get; set; }
    Property Value
    Type Description
    XRBaseController
    Remarks

    Setting this property will trigger the OnXRControllerChanged() method when set externally.

    Methods

    Awake()

    See MonoBehaviour.

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

    GetActivateTargets(List<IXRActivateInteractable>)

    Retrieve the list of Interactables that this Interactor could possibly activate or deactivate this frame.

    Declaration
    public virtual void GetActivateTargets(List<IXRActivateInteractable> targets)
    Parameters
    Type Name Description
    List<IXRActivateInteractable> targets

    The results list to populate with Interactables that are valid for activate or deactivate.

    Remarks

    When implementing this method, Unity expects you to clear targets before adding to it.

    OnHoverEntering(HoverEnterEventArgs)

    The XRInteractionManager calls this method right before the Interactor first initiates hovering over an Interactable in a first pass.

    Declaration
    protected override void OnHoverEntering(HoverEnterEventArgs args)
    Parameters
    Type Name Description
    HoverEnterEventArgs args

    Event data containing the Interactable that is being hovered over.

    Overrides
    XRBaseInteractor.OnHoverEntering(HoverEnterEventArgs)
    Remarks

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

    See Also
    OnHoverEntered(HoverEnterEventArgs)

    OnHoverExiting(HoverExitEventArgs)

    The XRInteractionManager calls this method right before the Interactor ends hovering over an Interactable in a first pass.

    Declaration
    protected override void OnHoverExiting(HoverExitEventArgs args)
    Parameters
    Type Name Description
    HoverExitEventArgs args

    Event data containing the Interactable that is no longer hovered over.

    Overrides
    XRBaseInteractor.OnHoverExiting(HoverExitEventArgs)
    Remarks

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

    See Also
    OnHoverExited(HoverExitEventArgs)

    OnSelectEntering(SelectEnterEventArgs)

    The XRInteractionManager calls this method right before the Interactor first initiates selection of an Interactable in a first pass.

    Declaration
    protected override void OnSelectEntering(SelectEnterEventArgs args)
    Parameters
    Type Name Description
    SelectEnterEventArgs args

    Event data containing the Interactable that is being selected.

    Overrides
    XRBaseInteractor.OnSelectEntering(SelectEnterEventArgs)
    Remarks

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

    See Also
    OnSelectEntered(SelectEnterEventArgs)

    OnSelectExiting(SelectExitEventArgs)

    The XRInteractionManager calls this method right before the Interactor ends selection of an Interactable in a first pass.

    Declaration
    protected override void OnSelectExiting(SelectExitEventArgs args)
    Parameters
    Type Name Description
    SelectExitEventArgs args

    Event data containing the Interactable that is no longer selected.

    Overrides
    XRBaseInteractor.OnSelectExiting(SelectExitEventArgs)
    Remarks

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

    See Also
    OnSelectExited(SelectExitEventArgs)

    PlayAudio(AudioClip)

    Play an AudioClip.

    Declaration
    protected virtual void PlayAudio(AudioClip audioClip)
    Parameters
    Type Name Description
    AudioClip audioClip

    The clip to play.

    PreprocessInteractor(UpdatePhase)

    The XRInteractionManager or containing IXRInteractionGroup calls this method to update the Interactor before interaction events occur. Interactors should use this method to do tasks like determine their valid targets.

    Declaration
    public override void PreprocessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
    Parameters
    Type Name Description
    XRInteractionUpdateOrder.UpdatePhase updatePhase

    The update phase this is called during.

    Overrides
    XRBaseInteractor.PreprocessInteractor(XRInteractionUpdateOrder.UpdatePhase)
    Remarks

    Please see the XRInteractionManager and XRInteractionUpdateOrder.UpdatePhase documentation for more details on update order.

    See Also
    XRInteractionUpdateOrder.UpdatePhase

    ProcessInteractor(UpdatePhase)

    The XRInteractionManager or containing IXRInteractionGroup calls this method to update the Interactor after interaction events occur.

    Declaration
    public override void ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
    Parameters
    Type Name Description
    XRInteractionUpdateOrder.UpdatePhase updatePhase

    The update phase this is called during.

    Overrides
    XRBaseInteractor.ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase)
    Remarks

    Please see the XRInteractionManager and XRInteractionUpdateOrder.UpdatePhase documentation for more details on update order.

    See Also
    XRInteractionUpdateOrder.UpdatePhase
    ProcessInteractable(UpdatePhase)

    SendHapticImpulse(float, float)

    Play a haptic impulse on the controller if one is available.

    Declaration
    public bool SendHapticImpulse(float amplitude, float duration)
    Parameters
    Type Name Description
    float amplitude

    Amplitude (from 0.0 to 1.0) to play impulse at.

    float duration

    Duration (in seconds) to play haptic impulse.

    Returns
    Type Description
    bool

    Returns true if successful. Otherwise, returns false.

    See Also
    SendHapticImpulse(float, float)

    Implements

    IXRHoverInteractor
    IXRSelectInteractor
    IXRTargetPriorityInteractor
    IXRGroupMember
    IXRInteractionStrengthInteractor
    IXRActivateInteractor
    IXRInteractor

    Extension Methods

    XRGroupMemberExtensions.GetTopLevelContainingGroup(IXRGroupMember)
    XRHoverInteractorExtensions.GetOldestInteractableHovered(IXRHoverInteractor)
    XRInteractorExtensions.IsBlockedByInteractionWithinGroup(IXRInteractor)
    XRSelectInteractorExtensions.GetOldestInteractableSelected(IXRSelectInteractor)
    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)