docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Manager

    The primary manager class for the SDK. Responsible for tracking data produced, uploading it, and waiting for it to complete.

    Inheritance
    object
    Manager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public sealed class Manager

    Fields

    QuitAction

    Action invoked when the Manager is ready to quit. Defaults to Application.Quit(). Replace with a no-op for testing.

    Declaration
    public static Action QuitAction
    Field Value
    Type Description
    Action

    ShutdownNotification

    Delegate which is called when the SDK is shutting down.

    Declaration
    public Manager.NotificationDelegate ShutdownNotification
    Field Value
    Type Description
    Manager.NotificationDelegate

    StartNotification

    Delegate which is called when the SDK starts.

    Declaration
    public Manager.NotificationDelegate StartNotification
    Field Value
    Type Description
    Manager.NotificationDelegate

    Tick

    Delegate for receiving per frame ticks.

    Declaration
    public Manager.TickDelegate Tick
    Field Value
    Type Description
    Manager.TickDelegate

    Properties

    FinalUploadsDone

    Returns a boolean indicating if all uploads to the cloud storage are done.

    Declaration
    public static bool FinalUploadsDone { get; }
    Property Value
    Type Description
    bool

    Instance

    Gets the singleton Manager instance.

    Declaration
    public static Manager Instance { get; }
    Property Value
    Type Description
    Manager

    ProfilerEnabled

    Accessor to enable/disable the profiler.

    Declaration
    public bool ProfilerEnabled { get; set; }
    Property Value
    Type Description
    bool

    ProfilerPath

    Returns the path to the profiler log.

    Declaration
    public string ProfilerPath { get; }
    Property Value
    Type Description
    string

    ShutdownCondition

    Gets or sets the condition that triggers an automatic shutdown when met. Cannot be changed after shutdown has been requested.

    Declaration
    public ICondition ShutdownCondition { get; set; }
    Property Value
    Type Description
    ICondition

    ShutdownRequested

    Returns a boolean indicating if shutdown has been requested.

    Declaration
    public static bool ShutdownRequested { get; }
    Property Value
    Type Description
    bool

    SimulationElapsedTime

    Returns Simulation time elapsed in seconds.

    Declaration
    public double SimulationElapsedTime { get; }
    Property Value
    Type Description
    double

    SimulationElapsedTimeUnscaled

    Returns unscaled simulation time in seconds.

    Declaration
    public double SimulationElapsedTimeUnscaled { get; }
    Property Value
    Type Description
    double

    WallElapsedTime

    Returns Wall time elapsed in seconds.

    Declaration
    public double WallElapsedTime { get; }
    Property Value
    Type Description
    double

    requestPoolCount

    Returns AsyncRequests pool count.

    Declaration
    public int requestPoolCount { get; }
    Property Value
    Type Description
    int

    Methods

    CompleteTrackedRequests(bool)

    Forces completion of tracked async requests. When allRequests is true, all in-flight requests are completed immediately. Otherwise, only requests that have exceeded their maximum allowed frame age are completed.

    Declaration
    public void CompleteTrackedRequests(bool allRequests = false)
    Parameters
    Type Name Description
    bool allRequests

    When true, forces all in-flight requests to complete immediately.

    ConsumerFileProduced(string, bool, bool)

    Inform the manager that file is produced and is ready for upload.

    Declaration
    public void ConsumerFileProduced(string filePath, bool synchronous = false, bool isArtifact = true)
    Parameters
    Type Name Description
    string filePath

    Full path to the file on the local file system

    bool synchronous

    boolean indicating if the upload is to be done synchronously.

    bool isArtifact

    A flag indicating if the file being consumed is an artifact or not.

    CreateRequest<T>()

    Create an instance of an AsyncRequest.

    Declaration
    public T CreateRequest<T>() where T : AsyncRequest, new()
    Returns
    Type Description
    T

    AsyncRequest of type T.

    Type Parameters
    Name Description
    T

    AsyncRequest type.

    GetDirectoryFor(string, string)

    Returns (and creates if needed) the storage directory for the given data type within the current session.

    Declaration
    public string GetDirectoryFor(string type = "", string userPath = "")
    Parameters
    Type Name Description
    string type

    The sub-directory name identifying the data type (e.g. Logs).

    string userPath

    An optional user-specified base path. When empty, defaults to storagePath.

    Returns
    Type Description
    string

    The full path to the session directory for the requested type.

    GetRequestsCount(Type)

    Returns the number of pooled (recycled) async requests of the specified type.

    Declaration
    public int GetRequestsCount(Type type)
    Parameters
    Type Name Description
    Type type

    The Type of AsyncRequest to query.

    Returns
    Type Description
    int

    The number of recycled requests of the given type in the pool.

    LateUpdate()

    Handles late-frame work: drains the end-of-frame queue in batch mode, and when shutdown is requested, flushes GPU readbacks, completes all outstanding requests, uploads final artifacts, and quits the application.

    Declaration
    public void LateUpdate()

    QueueEndOfFrameItem(Action<object>, object)

    Queues an action/callback to be executed at the end of the frame.

    Declaration
    [Obsolete("QueueEndOfFrameItem is obsolete, use QueueForEndOfFrame instead.")]
    public void QueueEndOfFrameItem(Action<object> callback, object functor)
    Parameters
    Type Name Description
    Action<object> callback

    Callback action that needs to be invoked at the end of the frame.

    object functor

    Functor that needs to be passed to the callback as an argument.

    QueueForEndOfFrame(Action)

    Queues an action/callback to be executed at the end of the frame.

    Declaration
    public void QueueForEndOfFrame(Action action)
    Parameters
    Type Name Description
    Action action

    The action message payload.

    QueueForMainThread(Action)

    Queues an action to be executed at the beginning of the next update. This is preferred to the QueueEndOfFrameItem, which will be deprecated in the future.

    Declaration
    public void QueueForMainThread(Action action)
    Parameters
    Type Name Description
    Action action

    Action that needs to be invoked.

    RecycleRequest<T>(T)

    Recycle the async request and put it back in the pool.

    Declaration
    public void RecycleRequest<T>(T request) where T : AsyncRequest
    Parameters
    Type Name Description
    T request

    AsyncRequest to be recycled.

    Type Parameters
    Name Description
    T

    AsyncRequest type T.

    RegisterDataConsumer(IDataProduced)

    Register a consumer for the data being generated.

    Declaration
    public void RegisterDataConsumer(IDataProduced consumer)
    Parameters
    Type Name Description
    IDataProduced consumer

    IDataProduced consumer to be added to the list of consumers.

    Shutdown()

    Begins shutting down the SDK. Shutdown will last until all uploads or any other consumption has completed.

    Declaration
    public void Shutdown()

    ShutdownAfterFrames(int)

    Shutdown after the specified number of frames have elapsed.

    Declaration
    public void ShutdownAfterFrames(int frameCount)
    Parameters
    Type Name Description
    int frameCount

    Number of frames to elapse before exiting the simulation.

    ShutdownAfterSimSeconds(double)

    Shutdown after the specified number of simulation seconds (scaled) have passed.

    Declaration
    public void ShutdownAfterSimSeconds(double seconds)
    Parameters
    Type Name Description
    double seconds

    Number of seconds to pass before exiting the simulation.

    ShutdownAfterWallSeconds(double)

    Shutdown after the specified number of wall seconds have passed.

    Declaration
    public void ShutdownAfterWallSeconds(double seconds)
    Parameters
    Type Name Description
    double seconds

    Number of seconds to pass before exiting the simulation.

    UnhandledExceptionHandler(object, UnhandledExceptionEventArgs)

    Logs unhandled exceptions from the current AppDomain as errors via Log.

    Declaration
    public static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
    Parameters
    Type Name Description
    object sender

    The source of the unhandled exception event.

    UnhandledExceptionEventArgs args

    Event data containing the exception object and termination flag.

    UnregisterDataConsumer(IDataProduced)

    Remove the consumer from the list of consumers

    Declaration
    public void UnregisterDataConsumer(IDataProduced consumer)
    Parameters
    Type Name Description
    IDataProduced consumer

    IDataProduced consumer to be removed from the list.

    Update()

    Advances the simulation by one frame: dispatches queued main-thread actions, updates elapsed time counters, invokes Tick, completes aged-out requests, and evaluates the shutdown condition.

    Declaration
    public void Update()

    UploadTracesFromPreviousRun(string)

    Upload the data from the previous run.

    Declaration
    public void UploadTracesFromPreviousRun(string path)
    Parameters
    Type Name Description
    string path

    Full path to the directory containing data from the previous run.

    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)