Class XRLoaderHelper
XR Loader abstract subclass used as a base class for specific provider implementations. Class provides some helper logic that can be used to handle subsystem handling in a typesafe manner, reducing potential boilerplate code.
Inherited Members
Namespace: UnityEngine.XR.Management
Assembly: solution.dll
Syntax
public abstract class XRLoaderHelper : XRLoader
Fields
Name | Description |
---|---|
m_SubsystemInstanceMap | Map of loaded susbsystems. Used so we don't always have to fo to XRSubsystemManger and do a manual search to find the instance we loaded. |
Methods
Name | Description |
---|---|
CreateIntegratedSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string) | Creates a native, integrated subsystem given a list of descriptors and a specific subsystem id. DEPRECATED: Please use the geenric CreateSubsystem method. This method is soley retained for backwards compatibility and will be removed in a future release. |
CreateStandaloneSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string) | Creates a managed, standalone subsystem given a list of descriptors and a specific subsystem id. DEPRECATED: Please use the geenric CreateSubsystem method. This method is soley retained for backwards compatibility and will be removed in a future release. |
CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string) | Creates a subsystem given a list of descriptors and a specific subsystem id. You should make sure to destroy any subsystem that you created so that resources acquired by your subsystems are correctly cleaned up and released. This is especially important if you create them during initialization, but initialization fails. If that happens, you should clean up any subsystems created up to that point. |
Deinitialize() | Override of Deinitialize() to provide for clearing the instance map.true If you override this method in your subclass, you must call the base implementation to allow the instance map tp be cleaned up correctly. |
DestroySubsystem<T>() | Destroy a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem |
GetLoadedSubsystem<T>() | Gets the loaded subsystem of the specified type. Implementation dependent as only implemetnations know what they have loaded and how best to get it.. |
StartSubsystem<T>() | Start a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem |
StopSubsystem<T>() | Stop a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem |