docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Object
    ScriptableObject
    XRLoader
    XRLoaderHelper
    Inherited Members
    XRLoader.Initialize()
    XRLoader.Start()
    XRLoader.Stop()
    XRLoader.GetSupportedGraphicsDeviceTypes(bool)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Management
    Assembly: Unity.XR.Management.dll
    Syntax
    public abstract class XRLoaderHelper : XRLoader

    Fields

    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.

    Declaration
    protected Dictionary<Type, ISubsystem> m_SubsystemInstanceMap
    Field Value
    Type Description
    Dictionary<Type, ISubsystem>

    Methods

    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.

    Declaration
    [Obsolete("This method is obsolete. Please use the geenric CreateSubsystem method.", false)]
    protected void CreateIntegratedSubsystem<TDescriptor, TSubsystem>(List<TDescriptor> descriptors, string id) where TDescriptor : IntegratedSubsystemDescriptor where TSubsystem : IntegratedSubsystem
    Parameters
    Type Name Description
    List<TDescriptor> descriptors

    List of TDescriptor instances to use for subsystem matching.

    string id

    The identifier key of the particualr subsystem implementation being requested.

    Type Parameters
    Name Description
    TDescriptor

    The descriptor type being passed in.

    TSubsystem

    The subsystem type being requested

    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.

    Declaration
    [Obsolete("This method is obsolete. Please use the generic CreateSubsystem method.", false)]
    protected void CreateStandaloneSubsystem<TDescriptor, TSubsystem>(List<TDescriptor> descriptors, string id) where TDescriptor : SubsystemDescriptor where TSubsystem : Subsystem
    Parameters
    Type Name Description
    List<TDescriptor> descriptors

    List of TDescriptor instances to use for subsystem matching.

    string id

    The identifier key of the particualr subsystem implementation being requested.

    Type Parameters
    Name Description
    TDescriptor

    The descriptor type being passed in.

    TSubsystem

    The subsystem type being requested

    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.

    Declaration
    protected void CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor> descriptors, string id) where TDescriptor : ISubsystemDescriptor where TSubsystem : ISubsystem
    Parameters
    Type Name Description
    List<TDescriptor> descriptors

    List of TDescriptor instances to use for subsystem matching.

    string id

    The identifier key of the particualr subsystem implementation being requested.

    Type Parameters
    Name Description
    TDescriptor

    The descriptor type being passed in.

    TSubsystem

    The subsystem type being requested

    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.

    Declaration
    public override bool Deinitialize()
    Returns
    Type Description
    bool

    True if de-initialization was successful.

    Overrides
    XRLoader.Deinitialize()

    DestroySubsystem<T>()

    Destroy a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem

    Declaration
    protected void DestroySubsystem<T>() where T : class, ISubsystem
    Type Parameters
    Name Description
    T

    A subclass of UnityEngine.ISubsystem

    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..

    Declaration
    public override T GetLoadedSubsystem<T>() where T : class, ISubsystem
    Returns
    Type Description
    T

    The loaded subsystem or null if not found.

    Type Parameters
    Name Description
    T

    Type of the subsystem to get.

    Overrides
    XRLoader.GetLoadedSubsystem<T>()

    StartSubsystem<T>()

    Start a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem

    Declaration
    protected void StartSubsystem<T>() where T : class, ISubsystem
    Type Parameters
    Name Description
    T

    A subclass of UnityEngine.ISubsystem

    StopSubsystem<T>()

    Stop a subsystem instance of a given type. Subsystem assumed to already be loaded from a previous call to CreateSubsystem

    Declaration
    protected void StopSubsystem<T>() where T : class, ISubsystem
    Type Parameters
    Name Description
    T

    A subclass of UnityEngine.ISubsystem

    WasAssignedToBuildTarget(BuildTargetGroup)

    Declaration
    public virtual void WasAssignedToBuildTarget(BuildTargetGroup buildTargetGroup)
    Parameters
    Type Name Description
    BuildTargetGroup buildTargetGroup

    WasUnassignedFromBuildTarget(BuildTargetGroup)

    Declaration
    public virtual void WasUnassignedFromBuildTarget(BuildTargetGroup buildTargetGroup)
    Parameters
    Type Name Description
    BuildTargetGroup buildTargetGroup
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)