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 CollectorBase

Inheritance
object
CollectorBase
SampleProfilerCollector
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
[Serializable]
public abstract class CollectorBase

Constructors

CollectorBase()

Declaration
protected CollectorBase()

Fields

CollectorConsumer

Consumer delegate to consume the collector profiler report. Invoked when the collector is ready for dispatch.

Declaration
public CollectorBase.ConsumeCollectorReport CollectorConsumer
Field Value
Type Description
CollectorBase.ConsumeCollectorReport

category

Category for simulation profiler collector. Default is set to Logic.

Declaration
[SerializeField]
[HideInInspector]
public Category category
Field Value
Type Description
Category

m_Enabled

Field indicating if the collector is enabled.

Declaration
[SerializeField]
[HideInInspector]
public bool m_Enabled
Field Value
Type Description
bool

name

Name of the collector. Default is set to the name of the type.

Declaration
[SerializeField]
public string name
Field Value
Type Description
string

pathOnFileSystem

Declaration
[HideInInspector]
public string pathOnFileSystem
Field Value
Type Description
string

period

Period at which the collector dispatch needs to be invoked.

Declaration
public int period
Field Value
Type Description
int

simulationElapsedTime

Declaration
[HideInInspector]
public float simulationElapsedTime
Field Value
Type Description
float

Properties

defaultDispatcherEnabled

Returns if the default collector dispatcher is enabled.

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

Methods

AddEvent(EventBase)

Add Continuous event to the collector for profiling.

Declaration
public void AddEvent(EventBase e)
Parameters
Type Name Description
EventBase e

DispatchCollector(ProfilerReport)

Dispatch collector at an interval. Override this to dispatch the results to any other location other than local file system.

Declaration
public virtual void DispatchCollector(ProfilerReport report)
Parameters
Type Name Description
ProfilerReport report

GetEvents()

Get all the events associated with the collector.

Declaration
public List<EventBase> GetEvents()
Returns
Type Description
List<EventBase>

Initialize()

Initialize your collector settings here.

Declaration
public virtual void Initialize()

PopulateEvents()

Declaration
public abstract void PopulateEvents()
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