docs.unity3d.com
    Show / Hide Table of Contents

    Class BaseTeleportationInteractable

    This is intended to be the base class for all Teleportation Interactables. This abstracts the teleport request process for specializations of this class.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRBaseInteractable
    BaseTeleportationInteractable
    TeleportationAnchor
    TeleportationArea
    Inherited Members
    XRBaseInteractable.registered
    XRBaseInteractable.unregistered
    XRBaseInteractable.getDistanceOverride
    XRBaseInteractable.interactionManager
    XRBaseInteractable.colliders
    XRBaseInteractable.interactionLayers
    XRBaseInteractable.distanceCalculationMode
    XRBaseInteractable.selectMode
    XRBaseInteractable.customReticle
    XRBaseInteractable.firstHoverEntered
    XRBaseInteractable.lastHoverExited
    XRBaseInteractable.hoverEntered
    XRBaseInteractable.hoverExited
    XRBaseInteractable.firstSelectEntered
    XRBaseInteractable.lastSelectExited
    XRBaseInteractable.selectEntered
    XRBaseInteractable.selectExited
    XRBaseInteractable.activated
    XRBaseInteractable.deactivated
    XRBaseInteractable.interactorsHovering
    XRBaseInteractable.isHovered
    XRBaseInteractable.interactorsSelecting
    XRBaseInteractable.firstInteractorSelecting
    XRBaseInteractable.isSelected
    XRBaseInteractable.OnEnable()
    XRBaseInteractable.OnDisable()
    XRBaseInteractable.OnDestroy()
    XRBaseInteractable.GetAttachTransform(IXRInteractor)
    XRBaseInteractable.GetAttachPoseOnSelect(IXRSelectInteractor)
    XRBaseInteractable.GetLocalAttachPoseOnSelect(IXRSelectInteractor)
    XRBaseInteractable.GetDistanceSqrToInteractor(IXRInteractor)
    XRBaseInteractable.GetDistance(Vector3)
    XRBaseInteractable.IsHoverableBy(IXRHoverInteractor)
    XRBaseInteractable.IsSelectableBy(IXRSelectInteractor)
    XRBaseInteractable.AttachCustomReticle(IXRInteractor)
    XRBaseInteractable.RemoveCustomReticle(IXRInteractor)
    XRBaseInteractable.CaptureAttachPose(IXRSelectInteractor)
    XRBaseInteractable.ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractable.IXRInteractable.OnRegistered(InteractableRegisteredEventArgs)
    XRBaseInteractable.IXRInteractable.OnUnregistered(InteractableUnregisteredEventArgs)
    XRBaseInteractable.IXRActivateInteractable.OnActivated(ActivateEventArgs)
    XRBaseInteractable.IXRActivateInteractable.OnDeactivated(DeactivateEventArgs)
    XRBaseInteractable.IXRHoverInteractable.IsHoverableBy(IXRHoverInteractor)
    XRBaseInteractable.IXRHoverInteractable.OnHoverEntering(HoverEnterEventArgs)
    XRBaseInteractable.IXRHoverInteractable.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractable.IXRHoverInteractable.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractable.IXRHoverInteractable.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractable.IXRSelectInteractable.IsSelectableBy(IXRSelectInteractor)
    XRBaseInteractable.IXRSelectInteractable.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractable.IXRSelectInteractable.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractable.IXRSelectInteractable.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractable.IXRSelectInteractable.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractable.OnRegistered(InteractableRegisteredEventArgs)
    XRBaseInteractable.OnUnregistered(InteractableUnregisteredEventArgs)
    XRBaseInteractable.OnHoverEntering(HoverEnterEventArgs)
    XRBaseInteractable.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractable.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractable.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractable.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractable.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractable.interactionLayerMask
    XRBaseInteractable.onFirstHoverEntered
    XRBaseInteractable.onLastHoverExited
    XRBaseInteractable.onHoverEntered
    XRBaseInteractable.onHoverExited
    XRBaseInteractable.onSelectEntered
    XRBaseInteractable.onSelectExited
    XRBaseInteractable.onSelectCanceled
    XRBaseInteractable.onActivate
    XRBaseInteractable.onDeactivate
    XRBaseInteractable.onFirstHoverEnter
    XRBaseInteractable.onHoverEnter
    XRBaseInteractable.onHoverExit
    XRBaseInteractable.onLastHoverExit
    XRBaseInteractable.onSelectEnter
    XRBaseInteractable.onSelectExit
    XRBaseInteractable.onSelectCancel
    XRBaseInteractable.OnHoverEntering(XRBaseInteractor)
    XRBaseInteractable.OnHoverEntered(XRBaseInteractor)
    XRBaseInteractable.OnHoverExiting(XRBaseInteractor)
    XRBaseInteractable.OnHoverExited(XRBaseInteractor)
    XRBaseInteractable.OnSelectEntering(XRBaseInteractor)
    XRBaseInteractable.OnSelectEntered(XRBaseInteractor)
    XRBaseInteractable.OnSelectExiting(XRBaseInteractor)
    XRBaseInteractable.OnSelectExited(XRBaseInteractor)
    XRBaseInteractable.OnSelectCanceling(XRBaseInteractor)
    XRBaseInteractable.OnSelectCanceled(XRBaseInteractor)
    XRBaseInteractable.OnActivate(XRBaseInteractor)
    XRBaseInteractable.OnDeactivate(XRBaseInteractor)
    XRBaseInteractable.GetDistanceSqrToInteractor(XRBaseInteractor)
    XRBaseInteractable.AttachCustomReticle(XRBaseInteractor)
    XRBaseInteractable.RemoveCustomReticle(XRBaseInteractor)
    XRBaseInteractable.hoveringInteractors
    XRBaseInteractable.selectingInteractor
    XRBaseInteractable.IsHoverableBy(XRBaseInteractor)
    XRBaseInteractable.IsSelectableBy(XRBaseInteractor)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(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, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, 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
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    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, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public abstract class BaseTeleportationInteractable : XRBaseInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRInteractable

    Properties

    matchOrientation

    How to orient the rig after teleportation.

    Declaration
    public MatchOrientation matchOrientation { get; set; }
    Property Value
    Type Description
    MatchOrientation
    Remarks

    Set to:

    • WorldSpaceUp to stay oriented according to the world space up vector.
    • TargetUp to orient according to the target BaseTeleportationInteractable Transform's up vector.
    • TargetUpAndForward to orient according to the target BaseTeleportationInteractable Transform's rotation.
    • None to maintain the same orientation before and after teleporting.

    teleportationProvider

    The teleportation provider that this teleportation interactable communicates teleport requests to. If no teleportation provider is configured, will attempt to find a teleportation provider during Awake.

    Declaration
    public TeleportationProvider teleportationProvider { get; set; }
    Property Value
    Type Description
    TeleportationProvider

    teleporting

    Gets or sets the event that Unity calls when queuing to teleport via the TeleportationProvider.

    Declaration
    public TeleportingEvent teleporting { get; set; }
    Property Value
    Type Description
    TeleportingEvent
    Remarks

    The TeleportingEventArgs passed to each listener is only valid while the event is invoked, do not hold a reference to it.

    teleportTrigger

    Specifies when the teleportation triggers.

    Declaration
    public BaseTeleportationInteractable.TeleportTrigger teleportTrigger { get; set; }
    Property Value
    Type Description
    BaseTeleportationInteractable.TeleportTrigger

    Methods

    Awake()

    See MonoBehaviour.

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

    GenerateTeleportRequest(IXRInteractor, RaycastHit, ref TeleportRequest)

    Automatically called upon the teleport trigger event occurring to generate the teleport request. The teleportation destination pose should be filled out.

    Declaration
    protected virtual bool GenerateTeleportRequest(IXRInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
    Parameters
    Type Name Description
    IXRInteractor interactor

    The interactor that initiated the teleport trigger.

    RaycastHit raycastHit

    The ray cast hit information from the interactor.

    TeleportRequest teleportRequest

    The teleport request that should be filled out during this method call.

    Returns
    Type Description
    Boolean

    Returns true if the teleport request was successfully updated and should be queued. Otherwise, returns false.

    See Also
    QueueTeleportRequest(TeleportRequest)

    GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest)

    Automatically called upon the teleport trigger when a teleport request should be generated.

    Declaration
    [Obsolete("GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest) has been deprecated. Use GenerateTeleportRequest(IXRInteractor, RaycastHit, ref TeleportRequest) instead.")]
    protected virtual bool GenerateTeleportRequest(XRBaseInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
    Parameters
    Type Name Description
    XRBaseInteractor interactor

    The interactor that initiated the teleport trigger.

    RaycastHit raycastHit

    The ray cast hit information from the interactor.

    TeleportRequest teleportRequest

    The teleport request that should be filled out during this method call.

    Returns
    Type Description
    Boolean

    Returns true if the teleport request was successfully updated and should be queued. Otherwise, returns false.

    Remarks

    GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest) has been deprecated. Use GenerateTeleportRequest(IXRInteractor, RaycastHit, ref TeleportRequest) instead.

    See Also
    QueueTeleportRequest(TeleportRequest)

    OnActivated(ActivateEventArgs)

    XRBaseControllerInteractor calls this method when the Interactor begins an activation event on this Interactable.

    Declaration
    protected override void OnActivated(ActivateEventArgs args)
    Parameters
    Type Name Description
    ActivateEventArgs args

    Event data containing the Interactor that is sending the activate event.

    Overrides
    XRBaseInteractable.OnActivated(ActivateEventArgs)
    Remarks

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

    See Also
    OnDeactivated(DeactivateEventArgs)

    OnDeactivated(DeactivateEventArgs)

    XRBaseControllerInteractor calls this method when the Interactor ends an activation event on this Interactable.

    Declaration
    protected override void OnDeactivated(DeactivateEventArgs args)
    Parameters
    Type Name Description
    DeactivateEventArgs args

    Event data containing the Interactor that is sending the deactivate event.

    Overrides
    XRBaseInteractable.OnDeactivated(DeactivateEventArgs)
    Remarks

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

    See Also
    OnActivated(ActivateEventArgs)

    OnSelectEntered(SelectEnterEventArgs)

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

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

    Event data containing the Interactor that is initiating the selection.

    Overrides
    XRBaseInteractable.OnSelectEntered(SelectEnterEventArgs)
    Remarks

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

    See Also
    OnSelectExited(SelectExitEventArgs)

    OnSelectExited(SelectExitEventArgs)

    The XRInteractionManager calls this method when the Interactor ends selection of an Interactable in a second pass.

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

    Event data containing the Interactor that is ending the selection.

    Overrides
    XRBaseInteractable.OnSelectExited(SelectExitEventArgs)
    Remarks

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

    See Also
    OnSelectEntered(SelectEnterEventArgs)

    Reset()

    See MonoBehaviour.

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

    Extension Methods

    XRHoverInteractableExtensions.GetOldestInteractorHovering(IXRHoverInteractable)
    XRSelectInteractableExtensions.GetOldestInteractorSelecting(IXRSelectInteractable)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023