Class MixedRealityToolkit
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.
Inheritance
MixedRealityToolkit
Assembly: cs.temp.dll.dll
public class MixedRealityToolkit : MonoBehaviour, IMixedRealityServiceRegistrar, MonoBehaviour
Properties
The public property of the Active Profile, ensuring events are raised on the change of the configuration
Declaration
public MixedRealityToolkitConfigurationProfile ActiveProfile { get; set; }
Property Value
The public property of the Active Profile, ensuring events are raised on the change of the configuration
Declaration
public MixedRealityToolkitConfigurationProfile ActiveProfile { get; set; }
Property Value
Current active systems registered with the MixedRealityToolkit.
Declaration
public IReadOnlyDictionary<Type, IMixedRealityService> ActiveSystems { get; }
Property Value
Current active systems registered with the MixedRealityToolkit.
Declaration
public IReadOnlyDictionary<Type, IMixedRealityService> ActiveSystems { get; }
Property Value
The current Boundary System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityBoundarySystem BoundarySystem { get; }
Property Value
Type |
Description |
IMixedRealityBoundarySystem |
|
The current Boundary System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityBoundarySystem BoundarySystem { get; }
Property Value
Type |
Description |
IMixedRealityBoundarySystem |
|
The current Camera System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityCameraSystem CameraSystem { get; }
Property Value
Type |
Description |
IMixedRealityCameraSystem |
|
The current Camera System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityCameraSystem CameraSystem { get; }
Property Value
Type |
Description |
IMixedRealityCameraSystem |
|
The current Diagnostics System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityDiagnosticsSystem DiagnosticsSystem { get; }
Property Value
Type |
Description |
IMixedRealityDiagnosticsSystem |
|
The current Diagnostics System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityDiagnosticsSystem DiagnosticsSystem { get; }
Property Value
Type |
Description |
IMixedRealityDiagnosticsSystem |
|
Checks if there is a valid instance of the MixedRealityToolkit, then checks if there is there a valid Active Profile.
Declaration
public bool HasActiveProfile { get; }
Property Value
Checks if there is a valid instance of the MixedRealityToolkit, then checks if there is there a valid Active Profile.
Declaration
public bool HasActiveProfile { get; }
Property Value
The current Input System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityInputSystem InputSystem { get; }
Property Value
Type |
Description |
IMixedRealityInputSystem |
|
The current Input System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityInputSystem InputSystem { get; }
Property Value
Type |
Description |
IMixedRealityInputSystem |
|
Returns the Singleton instance of the classes type.
Declaration
public static MixedRealityToolkit Instance { get; }
Property Value
Returns the Singleton instance of the classes type.
Declaration
public static MixedRealityToolkit Instance { get; }
Property Value
Returns true if this is the active instance.
Declaration
public bool IsActiveInstance { get; }
Property Value
Returns true if this is the active instance.
Declaration
public bool IsActiveInstance { get; }
Property Value
Returns whether the instance has been initialized or not.
Declaration
public static bool IsInitialized { get; }
Property Value
Returns whether the instance has been initialized or not.
Declaration
public static bool IsInitialized { get; }
Property Value
Returns true if the MixedRealityToolkit exists and has an active profile that has Scene system enabled.
Declaration
public static bool IsSceneSystemEnabled { get; }
Property Value
Returns true if the MixedRealityToolkit exists and has an active profile that has Scene system enabled.
Declaration
public static bool IsSceneSystemEnabled { get; }
Property Value
Returns true if the MixedRealityToolkit exists and has an active profile that has Teleport system enabled.
Declaration
public static bool IsTeleportSystemEnabled { get; }
Property Value
Returns true if the MixedRealityToolkit exists and has an active profile that has Teleport system enabled.
Declaration
public static bool IsTeleportSystemEnabled { get; }
Property Value
Local service registry for the Mixed Reality Toolkit, to allow runtime use of the IMixedRealityService.
Declaration
public IReadOnlyList<Tuple<Type, IMixedRealityService>> RegisteredMixedRealityServices { get; }
Property Value
Local service registry for the Mixed Reality Toolkit, to allow runtime use of the IMixedRealityService.
Declaration
public IReadOnlyList<Tuple<Type, IMixedRealityService>> RegisteredMixedRealityServices { get; }
Property Value
The current Scene System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealitySceneSystem SceneSystem { get; }
Property Value
Type |
Description |
IMixedRealitySceneSystem |
|
The current Scene System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealitySceneSystem SceneSystem { get; }
Property Value
Type |
Description |
IMixedRealitySceneSystem |
|
The current Spatial Awareness System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem { get; }
Property Value
Type |
Description |
IMixedRealitySpatialAwarenessSystem |
|
The current Spatial Awareness System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem { get; }
Property Value
Type |
Description |
IMixedRealitySpatialAwarenessSystem |
|
The current Teleport System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityTeleportSystem TeleportSystem { get; }
Property Value
Type |
Description |
IMixedRealityTeleportSystem |
|
The current Teleport System registered with the Mixed Reality Toolkit.
Declaration
public static IMixedRealityTeleportSystem TeleportSystem { get; }
Property Value
Type |
Description |
IMixedRealityTeleportSystem |
|
Methods
Expose an assertion whether the MixedRealityToolkit class is initialized.
Declaration
public static void AssertIsInitialized()
Expose an assertion whether the MixedRealityToolkit class is initialized.
Declaration
public static void AssertIsInitialized()
Static function to determine if the MixedRealityToolkit class has been initialized or not.
Declaration
public static bool ConfirmInitialized()
Returns
Static function to determine if the MixedRealityToolkit class has been initialized or not.
Declaration
public static bool ConfirmInitialized()
Returns
Disable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public void DisableAllServicesByType(Type interfaceType)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be removed. E.G. InputSystem, BoundarySystem
|
Disable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public void DisableAllServicesByType(Type interfaceType)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be removed. E.G. InputSystem, BoundarySystem
|
Disable all services in the Mixed Reality Toolkit active service registry for a given type and name
Declaration
public void DisableAllServicesByTypeAndName(Type interfaceType, string serviceName)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be disabled. E.G. InputSystem, BoundarySystem
|
String |
serviceName |
Name of the specific service
|
Disable all services in the Mixed Reality Toolkit active service registry for a given type and name
Declaration
public void DisableAllServicesByTypeAndName(Type interfaceType, string serviceName)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be disabled. E.G. InputSystem, BoundarySystem
|
String |
serviceName |
Name of the specific service
|
Enable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public void EnableAllServicesByType(Type interfaceType)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem
|
Enable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public void EnableAllServicesByType(Type interfaceType)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem
|
Enable all services in the Mixed Reality Toolkit active service registry for a given type and name
Declaration
public void EnableAllServicesByTypeAndName(Type interfaceType, string serviceName)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem
|
String |
serviceName |
Name of the specific service
|
Enable all services in the Mixed Reality Toolkit active service registry for a given type and name
Declaration
public void EnableAllServicesByTypeAndName(Type interfaceType, string serviceName)
Parameters
Type |
Name |
Description |
Type |
interfaceType |
The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem
|
String |
serviceName |
Name of the specific service
|
Declaration
public T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Returns
Type Parameters
Declaration
public T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Returns
Type Parameters
Declaration
public IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type |
Description |
IReadOnlyList<T> |
|
Type Parameters
Declaration
public IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type |
Description |
IReadOnlyList<T> |
|
Type Parameters
Declaration
public bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
public bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Generic function used to interrogate the Mixed Reality Toolkit active system registry for the existence of a core system.
Declaration
public bool IsSystemRegistered<T>()
where T : IMixedRealityService
Returns
Type |
Description |
Boolean |
True, there is a system registered with the selected interface, False, no system found for that interface
|
Type Parameters
Name |
Description |
T |
The interface type for the system to be retrieved. E.G. InputSystem, BoundarySystem.
|
Generic function used to interrogate the Mixed Reality Toolkit active system registry for the existence of a core system.
Declaration
public bool IsSystemRegistered<T>()
where T : IMixedRealityService
Returns
Type |
Description |
Boolean |
True, there is a system registered with the selected interface, False, no system found for that interface
|
Type Parameters
Name |
Description |
T |
The interface type for the system to be retrieved. E.G. InputSystem, BoundarySystem.
|
Declaration
public bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
|
SupportedPlatforms |
supportedPlatforms |
|
Object[] |
args |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
|
SupportedPlatforms |
supportedPlatforms |
|
Object[] |
args |
|
Returns
Type Parameters
When a configuration Profile is replaced with a new configuration, force all services to reset and read the new values
Declaration
public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile)
Parameters
When a configuration Profile is replaced with a new configuration, force all services to reset and read the new values
Declaration
public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile)
Parameters
Declaration
public static void SetActiveInstance(MixedRealityToolkit toolkitInstance)
Parameters
Declaration
public static void SetActiveInstance(MixedRealityToolkit toolkitInstance)
Parameters
Declaration
public static void SetInstanceInactive(MixedRealityToolkit toolkitInstance)
Parameters
Declaration
public static void SetInstanceInactive(MixedRealityToolkit toolkitInstance)
Parameters
Declaration
public bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Implements
MonoBehaviour