docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARCoreSessionSubsystem

    The ARCore implementation of the XRSessionSubsystem. Do not create this directly. Use the SubsystemManager instead.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>
    XRSessionSubsystem
    ARCoreSessionSubsystem
    Implements
    ISubsystem
    Inherited Members
    XRSessionSubsystem.nativePtr
    XRSessionSubsystem.sessionId
    XRSessionSubsystem.GetAvailabilityAsync()
    XRSessionSubsystem.InstallAsync()
    XRSessionSubsystem.Reset()
    XRSessionSubsystem.DetermineConfiguration(Feature)
    XRSessionSubsystem.Update(XRSessionUpdateParams)
    XRSessionSubsystem.currentConfiguration
    XRSessionSubsystem.requestedFeatures
    XRSessionSubsystem.GetConfigurationDescriptors(Allocator)
    XRSessionSubsystem.OnApplicationPause()
    XRSessionSubsystem.OnApplicationResume()
    XRSessionSubsystem.trackingState
    XRSessionSubsystem.requestedTrackingMode
    XRSessionSubsystem.currentTrackingMode
    XRSessionSubsystem.configurationChooser
    XRSessionSubsystem.notTrackingReason
    XRSessionSubsystem.matchFrameRateEnabled
    XRSessionSubsystem.matchFrameRateRequested
    XRSessionSubsystem.frameRate
    SubsystemWithProvider<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>.subsystemDescriptor
    SubsystemWithProvider.Start()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARCore
    Assembly: Unity.XR.ARCore.dll
    Syntax
    [Preserve]
    public sealed class ARCoreSessionSubsystem : XRSessionSubsystem, ISubsystem

    Properties

    playbackStatus

    (Read Only) The current playback status.

    Declaration
    public ArPlaybackStatus playbackStatus { get; }
    Property Value
    Type Description
    ArPlaybackStatus

    Whether or not the session is playing back a recording (or has stopped because of an error).

    recordingStatus

    (Read Only) The current recording status.

    Declaration
    public ArRecordingStatus recordingStatus { get; }
    Property Value
    Type Description
    ArRecordingStatus

    Whether or not the session is recording (or has stopped because of an error).

    session

    (Read Only) The ArSession associated with the subsystem. May be null.

    Declaration
    public ArSession session { get; }
    Property Value
    Type Description
    ArSession

    The session instance.

    Methods

    OnCreate()

    Invoked when the subsystem is created.

    Declaration
    protected override void OnCreate()
    Overrides
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRSessionSubsystem, UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Provider>.OnCreate()

    SetConfigurationDirty()

    Initiates a configuration change.

    Declaration
    public void SetConfigurationDirty()
    Remarks

    When you call this function, the session dispatches a beforeSetConfiguration event.

    StartPlayback(string)

    Starts playing back a previously recorded session. (see StartRecording(ArRecordingConfig))

    Declaration
    public ArStatus StartPlayback(string playbackDataset)
    Parameters
    Type Name Description
    string playbackDataset

    The path to an mp4 file previously recorded using StartRecording(ArRecordingConfig).

    Returns
    Type Description
    ArStatus

    Returns Success if successful. Returns one of the following otherwise: - Returns ErrorSessionUnsupported if playback is incompatible with selected features. - Returns ErrorPlaybackFailed if an error occurred with the MP4 dataset file such as not being able to open the file or the file is unable to be decoded.

    Remarks

    The begin playback, the session must first be paused, the playback dataset set, then resumed. This method does all of those things for you, but can take significant time (.5 - 1 seconds) to do so.

    See Also
    StartRecording(ArRecordingConfig)
    StopRecording()
    StopPlayback()

    StartRecording(ArRecordingConfig)

    Starts recording a session.

    Declaration
    public ArStatus StartRecording(ArRecordingConfig recordingConfig)
    Parameters
    Type Name Description
    ArRecordingConfig recordingConfig

    The configuration for the recording.

    Returns
    Type Description
    ArStatus

    Returns Success if recording successfully begins. Returns one of the following otherwise: - ErrorIllegalState - ErrorInvalidArgument - ErrorRecordingFailed

    See Also
    StopRecording()
    StartPlayback(string)
    StopPlayback()

    StopPlayback()

    Stops playing back a session recording.

    Declaration
    public ArStatus StopPlayback()
    Returns
    Type Description
    ArStatus

    Returns Success if successful. Returns one of the following otherwise: - ErrorSessionUnsupported if playback is incompatible with selected features. - ErrorPlaybackFailed if an error occurred with the MP4 dataset file such as not being able to open the file or the file is unable to be decoded.

    See Also
    StartPlayback(string)
    StartRecording(ArRecordingConfig)
    StopRecording()

    StopRecording()

    Stops recording a session.

    Declaration
    public ArStatus StopRecording()
    Returns
    Type Description
    ArStatus

    Returns Success if successful. Returns ErrorRecordingFailed otherwise.

    See Also
    StartRecording(ArRecordingConfig)
    StartPlayback(string)
    StopPlayback()

    Events

    beforeSetConfiguration

    An event that is triggered right before the configuration is set on the session. Allows changes to be made to the configuration before it is set.

    Declaration
    public event Action<ARCoreBeforeSetConfigurationEventArgs> beforeSetConfiguration
    Event Type
    Type Description
    Action<ARCoreBeforeSetConfigurationEventArgs>

    An Action delegate that provides access to the new session config before it is applied.

    Implements

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