docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRSubsystem<TSubsystem, TSubsystemDescriptor, TProvider>

    Base class for subsystems that enables asynchronous start and the ability to automatically request required permissions on any platform.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>
    XRSubsystem<TSubsystem, TSubsystemDescriptor, TProvider>
    TrackingSubsystem<TTrackable, TSubsystem, TSubsystemDescriptor, TProvider>
    XRCameraSubsystem
    XROcclusionSubsystem
    XRSessionSubsystem
    Implements
    ISubsystem
    Inherited Members
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.OnCreate()
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.OnStart()
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.OnStop()
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.OnDestroy()
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.subsystemDescriptor
    SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>.provider
    SubsystemWithProvider.Start()
    SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public class XRSubsystem<TSubsystem, TSubsystemDescriptor, TProvider> : SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>, ISubsystem where TSubsystem : SubsystemWithProvider, new() where TSubsystemDescriptor : SubsystemDescriptorWithProvider where TProvider : SubsystemProvider<TSubsystem>
    Type Parameters
    Name Description
    TSubsystem

    The subsystem type.

    TSubsystemDescriptor

    The subsystem descriptor type.

    TProvider

    The subsystem provider type.

    Methods

    GetPermissionState()

    Get the state of any required permissions for this subsystem to run on the current device.

    Declaration
    public virtual XRPermissionState GetPermissionState()
    Returns
    Type Description
    XRPermissionState

    The permission state.

    TryStartAsync(CancellationToken, XRSubsystemStartOptions)

    Attempts to start the subsystem with the given options.

    Declaration
    public virtual Awaitable<XRResultStatus> TryStartAsync(CancellationToken token = default, XRSubsystemStartOptions options = XRSubsystemStartOptions.None)
    Parameters
    Type Name Description
    CancellationToken token

    An optional cancellation token, which you can use to cancel the operation in progress.

    XRSubsystemStartOptions options

    The start options.

    Returns
    Type Description
    Awaitable<XRResultStatus>

    A status representing whether the subsystem was successfully started, and any applicable error codes from the runtime.

    Implements

    ISubsystem
    In This Article
    Back to top
    Copyright © 2026 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)