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
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
public abstract class BaseTeleportationInteractable : XRBaseInteractable
Properties
matchOrientation
How to orient the rig after teleportation.
Declaration
public MatchOrientation matchOrientation { get; set; }
Property Value
Type | Description |
---|---|
MatchOrientation |
Remarks
Set to:
teleportationProvider
The teleportation provider that this teleportation interactable will communicate 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 |
teleportTrigger
Specifies when the teleportation will be triggered.
Declaration
public BaseTeleportationInteractable.TeleportTrigger teleportTrigger { get; set; }
Property Value
Type | Description |
---|---|
BaseTeleportationInteractable.TeleportTrigger |
Methods
Awake()
Declaration
protected override void Awake()
Overrides
GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest)
Declaration
protected virtual bool GenerateTeleportRequest(XRBaseInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | |
RaycastHit | raycastHit | |
TeleportRequest | teleportRequest |
Returns
Type | Description |
---|---|
Boolean |
OnActivate(XRBaseInteractor)
This method is called by the interaction manager when the interactor sends an activation event down to an interactable.
Declaration
protected override void OnActivate(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | Interactor that is sending the activation event. |
Overrides
OnDeactivate(XRBaseInteractor)
Declaration
protected override void OnDeactivate(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor |
Overrides
OnSelectEntered(XRBaseInteractor)
This method is called by the interaction manager when the interactor first initiates selection of an interactable.
Declaration
protected override void OnSelectEntered(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | Interactor that is initiating the selection. |
Overrides
See Also
OnSelectExited(XRBaseInteractor)
This method is called by the interaction manager when the interactor ends selection of an interactable.
Declaration
protected override void OnSelectExited(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | Interactor that is ending the selection. |