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 EventBase

Inheritance
object
EventBase
AggregationEvent
CounterEvent
ProfilerSamplingEvent
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 EventBase

Constructors

EventBase(string, float, EventCollectionDelegate)

Constucts an Event that collects a metric each interval and aggregates over a period.

Declaration
public EventBase(string eventName, float interval, ContinuousEvents.EventCollectionDelegate collector = null)
Parameters
Type Name Description
string eventName

The name of the event.

float interval

The interval in which to collect the metric, in seconds.

ContinuousEvents.EventCollectionDelegate collector

A delegate to collect the metric.

Fields

_elapsedInterval

Declaration
protected float _elapsedInterval
Field Value
Type Description
float

_elapsedPeriod

Declaration
protected float _elapsedPeriod
Field Value
Type Description
float

_interval

Declaration
protected float _interval
Field Value
Type Description
float

_period

Declaration
protected float _period
Field Value
Type Description
float

allowMultipledEventsOfType

Declaration
protected bool allowMultipledEventsOfType
Field Value
Type Description
bool

eventName

Name of the event.

Declaration
public string eventName
Field Value
Type Description
string

resetOnEachSampleCollection

Declaration
[JsonIgnore]
public bool resetOnEachSampleCollection
Field Value
Type Description
bool

Properties

collector

The delegate to use for collecting a metric to aggregate.

Declaration
[JsonIgnore]
public ContinuousEvents.EventCollectionDelegate collector { get; set; }
Property Value
Type Description
ContinuousEvents.EventCollectionDelegate

dispatchDelegate

The delegate to use for dispatching events.

Declaration
[JsonIgnore]
public ContinuousEvents.EventDispatchDelegate dispatchDelegate { get; set; }
Property Value
Type Description
ContinuousEvents.EventDispatchDelegate

Methods

IngestValue(double)

Override this method to provide implementation for ingesting the value to perform some aggregation.

Declaration
public virtual void IngestValue(double value)
Parameters
Type Name Description
double value

Value ingested from the data source.

Exceptions
Type Condition
NotImplementedException

IsMultipleEventsInstancesAllowed()

Declaration
public bool IsMultipleEventsInstancesAllowed()
Returns
Type Description
bool

Reset()

Implement this method to override the reset logic for the event before each sample capture.

Declaration
public virtual void Reset()

Update(float)

Declaration
public virtual void Update(float deltaTime)
Parameters
Type Name Description
float deltaTime
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