{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class XRSessionSubsystem | AR Subsystems | 4.2.9
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRSessionSubsystem

    This subsystem controls the lifecycle of an XR session. Some platforms, particularly those that have non-XR modes, need to be able to turn the session on and off to enter and exit XR modes of operation.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>
    XRSessionSubsystem
    Implements
    ISubsystem
    Inherited Members
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.OnCreate()
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.OnStart()
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.OnStop()
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.OnDestroy()
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.subsystemDescriptor
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.provider
    SubsystemWithProvider.Start()
    SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.running
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: solution.dll
    Syntax
    public class XRSessionSubsystem : SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>, ISubsystem

    Constructors

    Name Description
    XRSessionSubsystem()

    Do not call this directly. Call create on a valid XRSessionSubsystemDescriptor instead.

    Properties

    Name Description
    configurationChooser

    Get or set the ConfigurationChooser used by DetermineConfiguration(Feature). If set to null, the DefaultConfigurationChooser is used.

    currentConfiguration

    The current Configuration in use by the session.

    currentTrackingMode

    Get the current tracking mode in use by the subsystem.

    frameRate

    The native update rate of the AR Session.

    matchFrameRateEnabled

    Whether the AR session update is synchronized with the Unity frame rate. If true, Update(XRSessionUpdateParams) should block until the next AR frame is available.

    matchFrameRateRequested

    Get or set whether the match frame rate feature should be enabled. When enabled, the AR session update is synchronized with the Unity frame rate.

    nativePtr

    Returns an implementation-defined pointer associated with the session.

    notTrackingReason

    Gets the NotTrackingReason for the session.

    requestedFeatures

    Get the requested Features. These are used to determine the session's Configuration.

    requestedTrackingMode

    The requested tracking mode. Query for support with SubsystemDescriptor.supportedTrackingModes.

    sessionId

    Returns a unique session identifier for this session.

    trackingState

    Gets the TrackingState for the session.

    Methods

    Name Description
    DetermineConfiguration(Feature)

    Determines the Configuration the session will use given the requested features.

    GetAvailabilityAsync()

    Asynchronously retrieves the SessionAvailability. Used to determine whether the current device supports XR and if the necessary software is installed.

    GetConfigurationDescriptors(Allocator)

    Get the list of supported configuration descriptors. The session can have multiple, discrete modes of operation. A configuration represents the capabilities of a mode of operation, which can be a subset of the session's overal capabilities. That is, the session might support many features, but not all at the same time. This is used by DetermineConfiguration(Feature) to determine the best configuration given a set of requested features.

    InstallAsync()

    Asynchronously attempts to install XR software on the current device. Throws if supportsInstall is false.

    OnApplicationPause()

    Should be invoked when the application is paused.

    OnApplicationResume()

    Should be invoked when the application is resumed.

    Reset()

    Restarts a session. Stop and Start pause and resume a session, respectively. Restart resets the session state and clears and any detected trackables.

    Update(XRSessionUpdateParams)

    Trigger the session's update loop.

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