Namespace UnityEngine.XR.Management | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Namespace UnityEngine.XR.Management

    Classes

    CuratedInfo

    XRConfigurationDataAttribute

    This attribute is used to tag classes as providing build settings support for an XR SDK provider. The unified setting system will present the settings as an inspectable object in the Unified Settings window using the built-in inspector UI.

    The implementor of the settings is able to create their own custom UI and the Unified Settings system will use that UI in place of the build in inspector. See the Extending the Editor portion of the Unity documentation for information and instructions on doing this.

    XRCuratedPackages

    XRGeneralSettings

    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.

    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.

    XRManagerSettings

    Class to handle active loader and subsystem management for XR SDK. This class is to be added as a component on a GameObject in your scene. Given a list of loaders, it will attempt to load each loader in the given order. The first loader that is successful wins and all remaining loaders are ignored. The loader that succeeds is accessible through the activeLoader property on the manager.

    Depending on configuration the XRManager component will automatically manage the active loader at correct points in the scene lifecycle. The user can override certain points in the active loader lifecycle and manually manage them by toggling the Automatic Loading and Automatic Running properties through the inspector UI. Disabling Automatic Loading implies the the user is responsibile for the full lifecycle of the manager. Toggling this to false also toggles automatic running to false.

    Disabling Automatic Running implies that the user is responsible for starting and stopping the activeLoader through the StartSubsystems() and StopSubsystems() APIs.

    Automatic lifecycle management is executed as follows

    • OnEnable -> InitializeLoader(). The loader list will be iterated over and the first successful loader will be set as the active loader.
    • Start -> StartSubsystems(). Ask the active loader to start all subsystems.
    • OnDisable -> StopSubsystems(). Ask the active loader to stop all subsystems.
    • OnDestroy -> DeinitializeLoader(). Deinitialize and remove the active loader.
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023