Class TeleportationAnchor
An anchor is a teleportation destination which teleports the user to a pre-determined specific position and/or rotation.
Inheritance
TeleportationAnchor
Implements
Inherited Members
BaseTeleportationInteractable.GetReticleDirection(IXRInteractor, Vector3, out Vector3, out Vector3?)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Teleportation Anchor", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.TeleportationAnchor.html")]
public class TeleportationAnchor : BaseTeleportationInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect, IXRReticleDirectionProvider
Properties
| Name | Description |
|---|---|
| teleportAnchorTransform | The Transform that represents the teleportation destination. |
Methods
| Name | Description |
|---|---|
| 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. |
| GetAttachTransform(IXRInteractor) | Gets the Transform that serves as the attachment point for a given Interactor. |
| OnDrawGizmos() | Unity calls this when drawing gizmos. |
| OnValidate() | See MonoBehaviour. |
| Reset() | See MonoBehaviour. |