Modifier

Partager via


MixedRealityToolkit Class

Definition

This class is responsible for coordinating the operation of the Mixed Reality Toolkit. It is the only Singleton in the entire project. It provides a service registry for all active services that are used within a project as well as providing the active configuration profile for the project. The Profile can be swapped out at any time to meet the needs of your project.

public ref class MixedRealityToolkit : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::IMixedRealityServiceRegistrar
[UnityEngine.AddComponentMenu("Scripts/MRTK/Core/MixedRealityToolkit")]
[UnityEngine.DisallowMultipleComponent]
public class MixedRealityToolkit : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.IMixedRealityServiceRegistrar
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Core/MixedRealityToolkit")>]
[<UnityEngine.DisallowMultipleComponent>]
type MixedRealityToolkit = class
    inherit MonoBehaviour
    interface IMixedRealityServiceRegistrar
Public Class MixedRealityToolkit
Inherits MonoBehaviour
Implements IMixedRealityServiceRegistrar
Inheritance
UnityEngine.MonoBehaviour
MixedRealityToolkit
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.DisallowMultipleComponentAttribute
Implements

Constructors

MixedRealityToolkit()

Properties

ActiveProfile

The public property of the Active Profile, ensuring events are raised on the change of the configuration

ActiveSystems
Obsolete.

Current active systems registered with the MixedRealityToolkit.

BoundarySystem
Obsolete.

The current Boundary System registered with the Mixed Reality Toolkit.

CameraSystem
Obsolete.

The current Camera System registered with the Mixed Reality Toolkit.

DiagnosticsSystem
Obsolete.

The current Diagnostics System registered with the Mixed Reality Toolkit.

HasActiveProfile

Checks if there is a valid instance of the MixedRealityToolkit, then checks if there is there a valid Active Profile.

InputSystem
Obsolete.

The current Input System registered with the Mixed Reality Toolkit.

Instance

Returns the Singleton instance of the classes type.

IsActiveInstance

Returns true if this is the active instance.

IsInitialized

Returns whether the instance has been initialized or not.

IsProfileSwitching

Whether an active profile switching is currently in progress

IsSceneSystemEnabled

Returns true if the MixedRealityToolkit exists and has an active profile that has Scene system enabled.

IsTeleportSystemEnabled

Returns true if the MixedRealityToolkit exists and has an active profile that has Teleport system enabled.

RegisteredMixedRealityServices
Obsolete.

Local service registry for the Mixed Reality Toolkit, to allow runtime use of the IMixedRealityService.

SceneSystem
Obsolete.

The current Scene System registered with the Mixed Reality Toolkit.

SpatialAwarenessSystem
Obsolete.

The current Spatial Awareness System registered with the Mixed Reality Toolkit.

TeleportSystem
Obsolete.

The current Teleport System registered with the Mixed Reality Toolkit.

Methods

AssertIsInitialized()

Expose an assertion whether the MixedRealityToolkit class is initialized.

ConfirmInitialized()

Static function to determine if the MixedRealityToolkit class has been initialized or not.

DisableAllServicesByType(Type)

Disable all services in the Mixed Reality Toolkit active service registry for a given type

DisableAllServicesByTypeAndName(Type, String)

Disable all services in the Mixed Reality Toolkit active service registry for a given type and name

EnableAllServicesByType(Type)

Enable all services in the Mixed Reality Toolkit active service registry for a given type

EnableAllServicesByTypeAndName(Type, String)

Enable all services in the Mixed Reality Toolkit active service registry for a given type and name

GetService<T>(String, Boolean)

Gets the instance of the registered service.

GetServices<T>(String)

Gets the collection of the registered service instances matching the requested type.

IsServiceRegistered<T>(String)

Checks to see if a service of the specified type has been registered.

IsSystemRegistered<T>()
Obsolete.

Generic function used to interrogate the Mixed Reality Toolkit active system registry for the existence of a core system.

RegisterService<T>(T)

Registers a service of the specified type.

RegisterService<T>(Type, SupportedPlatforms, Object[])

Registers a service of the specified type.

ResetConfiguration(MixedRealityToolkitConfigurationProfile)

When a configuration Profile is replaced with a new configuration, force all services to reset and read the new values

SetActiveInstance(MixedRealityToolkit)
SetInstanceInactive(MixedRealityToolkit)
SetProfileBeforeInitialization(MixedRealityToolkitConfigurationProfile)

Set the active profile prior to the initialization (i.e. Awake()) of MixedRealityToolkit

UnregisterService<T>(String)

Unregisters a service of the specified type.

UnregisterService<T>(T)

Unregisters a service.

Applies to