Class MixedRealityTeleportSystem
The Mixed Reality Toolkit's 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>)
The main function for handling and forwarding all events to their intended recipients.
Declaration
public override void HandleEvent<T>(BaseEventData eventData, ExecuteEvents.EventFunction<T> eventHandler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData | Event Data |
ExecuteEvents.EventFunction<T> | eventHandler | Event Handler delegate |
Type Parameters
Name | Description |
---|---|
T | Event Handler Interface Type |
Overrides
Remarks
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 to listen 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 |