Class MixedRealityTeleportSystem
The Mixed Reality Toolkit's specific implementation of the IMixedRealityTeleportSystem
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Teleport
Assembly: cs.temp.dll.dll
Syntax
public class MixedRealityTeleportSystem : BaseCoreSystem, IMixedRealityTeleportSystem, IMixedRealityEventSystem, IMixedRealityService, IDisposable
Constructors
MixedRealityTeleportSystem()
Constructor.
Declaration
public MixedRealityTeleportSystem()
MixedRealityTeleportSystem(IMixedRealityServiceRegistrar)
Constructor.
Declaration
[Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
public MixedRealityTeleportSystem(IMixedRealityServiceRegistrar registrar)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the service. |
Properties
Name
Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.
Declaration
public override string Name { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Overrides
TeleportDuration
The duration of the teleport in seconds.
Declaration
public float TeleportDuration { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
Destroy()
Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.
Declaration
public override void Destroy()
Overrides
HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
Declaration
public override void HandleEvent<T>(BaseEventData eventData, ExecuteEvents.EventFunction<T> eventHandler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData | |
ExecuteEvents.EventFunction<T> | eventHandler |
Type Parameters
Name | Description |
---|---|
T |
Overrides
Initialize()
The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.
Declaration
public override void Initialize()
Overrides
RaiseTeleportCanceled(IMixedRealityPointer, IMixedRealityTeleportHotSpot)
Raise a teleportation canceled event.
Declaration
public void RaiseTeleportCanceled(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | The pointer that raised the event. |
IMixedRealityTeleportHotSpot | hotSpot | The teleport target |
RaiseTeleportRequest(IMixedRealityPointer, IMixedRealityTeleportHotSpot)
Raise a teleportation request event.
Declaration
public void RaiseTeleportRequest(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | The pointer that raised the event. |
IMixedRealityTeleportHotSpot | hotSpot | The teleport target |
RaiseTeleportStarted(IMixedRealityPointer, IMixedRealityTeleportHotSpot)
Raise a teleportation started event.
Declaration
public void RaiseTeleportStarted(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | The pointer that raised the event. |
IMixedRealityTeleportHotSpot | hotSpot | The teleport target |
Register(GameObject)
Register a GameObject from listening to Teleport events.
Declaration
public override void Register(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener |
Overrides
Unregister(GameObject)
Unregister a GameObject from listening to Teleport events.
Declaration
public override void Unregister(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener |