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.
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()
See
Declaration
protected override void Awake()
Overrides
GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest)
Generates a teleport request.
Declaration
protected virtual bool GenerateTeleportRequest(XRBaseInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | The interactor generating the teleport request. |
RaycastHit | raycastHit | The raycast hit where user will be teleported to. |
TeleportRequest | teleportRequest | The teleport request. |
Returns
Type | Description |
---|---|
Boolean | Returns true if button teleportation was successful. Otherwise, returns false. |
OnActivated(ActivateEventArgs)
This method is called by the XRBaseControllerInteractor when the Interactor begins an activation event on this selected 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
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnDeactivated(DeactivateEventArgs)
This method is called by the XRBaseControllerInteractor when the Interactor ends an activation event on this selected 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
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectEntered(SelectEnterEventArgs)
This method is called by the Interaction Manager 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
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectExited(SelectExitEventArgs)
This method is called by the Interaction Manager 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
Remarks
args
is only valid during this method call, do not hold a reference to it.