Class XRLoader
XR Loader abstract class used as a base class for specific provider implementations. Providers should implement subclasses of this to provide specific initialization and management implementations that make sense for their supported scenarios and needs.
Inherited Members
Namespace: UnityEngine.XR.Management
Assembly: Unity.XR.Management.dll
Syntax
public abstract class XRLoader : ScriptableObject
Methods
Deinitialize()
Destroy all subsystems that were created by this loader.
Declaration
public virtual bool Deinitialize()
Returns
| Type | Description |
|---|---|
| bool |
|
GetLoadedSubsystem<T>()
Gets the loaded subsystem of the specified type. (Implementation-dependent)
Declaration
public abstract T GetLoadedSubsystem<T>() where T : class, ISubsystem
Returns
| Type | Description |
|---|---|
| T | The loaded subsystem, or |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the subsystem to get. |
GetSupportedGraphicsDeviceTypes(bool)
Gets the loader's supported graphics device types. If the list is empty, it is assumed that it supports all graphics device types.
Declaration
public virtual List<GraphicsDeviceType> GetSupportedGraphicsDeviceTypes(bool buildingPlayer)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | buildingPlayer |
|
Returns
| Type | Description |
|---|---|
| List<GraphicsDeviceType> | The loader's supported graphics device types. |
Initialize()
Create all subsystems that this loader supports.
Declaration
public virtual bool Initialize()
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
This is the only method on XRLoader that Management uses to determine the active loader to use. If this
method returns true, Management locks this loader as the activeLoader
and and stops fall through processing on the loaders list of current loaders.
If this method returns false, XRManagerSettings continues to process the next loader
in the loaders list, or fails completely when the list is exhausted.
Start()
Start all subsystems that were created by this loader.
Declaration
public virtual bool Start()
Returns
| Type | Description |
|---|---|
| bool |
|
Stop()
Stop all subsystems that were created by this loader.
Declaration
public virtual bool Stop()
Returns
| Type | Description |
|---|---|
| bool |
|