docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
    • AddCollectorMenuAttribute
  • Unity.Simulation
    • AggregatedSample
    • AggregationEvent
    • ArrayCast
    • ArrayUtilities
    • AsyncRequest
    • AsyncRequest.ExecutionContext
    • AsyncRequest.Result
    • AsyncRequest.State
    • AsyncRequest<T>
    • BaseDataConsumer<T>
    • BaseDataConsumer<T>.Uploadable
    • Category
    • ChunkedStream
    • ChunkedUnityLog
    • CollectorBase
    • CollectorBase.ConsumeCollectorReport
    • CollectorElement
    • CollectorsBaseEditor
    • CollectorsList
    • Configuration
    • Configuration.SimulationConfiguration
    • ContentType
    • ContinuousEvents
    • ContinuousEvents.EventCollectionDelegate
    • ContinuousEvents.EventDispatchDelegate
    • CoreProfilerUtils
    • CounterEvent
    • CounterEventData
    • DXChunkedStream
    • DXChunkedUnityLog
    • DXFile
    • DXFormat
    • DXManager
    • DXTimeLogger
    • DataCapturePaths
    • DirectoryNameComponent
    • Dispatcher
    • EventBase
    • ExecUtility
    • ExitPlaymode
    • ExtensionNameComponent
    • FileNameComponent
    • FileProducer
    • Format
    • FrameCountCondition
    • FrameLimit
    • FrameNumberNameComponent
    • ICondition
    • IDataProduced
    • IGlobalProfilerDataDispatcher
    • IgnoreCollectorAttribute
    • LabelNameComponent
    • LambdaJob
    • LambdaJob.DelegateType
    • Log
    • Log.Level
    • Manager
    • Manager.NotificationDelegate
    • Manager.TickDelegate
    • NameComponent
    • NameGenerator
    • Options
    • PackageImportTests
    • PathUtility
    • PerfStatsManager
    • PlayerResolution
    • PlayerResolutionSettings
    • ProfilerManager
    • ProfilerProperties
    • ProfilerReport
    • ProfilerSamplingEvent
    • ReportingUtils
    • Sample
    • SampleProfilerCollector
    • SequenceNameComponent
    • SequencedPathName
    • SignedURLDataConsumer
    • SimSecondsCondition
    • SimulationProfiler
    • SimulationProfilerBase
    • SimulationProfilerEditor
    • TestUtility
    • ThreadUtility
    • TimeLimit
    • TimeLogger
    • TimeScale
    • TimeScaleEditor
    • TimeUtility
    • Timer
    • TimerSource
    • TimestampNameComponent
    • WallSecondsCondition

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.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public sealed class Manager

Fields

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

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

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)

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

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)

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

GetRequestsCount(Type)

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

LateUpdate()

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

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)

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

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()

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