docs.unity3d.com
    Show / Hide Table of Contents

    Class EventBase

    Inheritance
    Object
    EventBase
    AggregationEvent
    CounterEvent
    ProfilerSamplingEvent
    Namespace: Unity.Simulation
    Syntax
    [Serializable]
    public abstract class EventBase

    Constructors

    EventBase(String, Single, ContinuousEvents.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.

    Single 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
    Single

    _elapsedPeriod

    Declaration
    protected float _elapsedPeriod
    Field Value
    Type Description
    Single

    _interval

    Declaration
    protected float _interval
    Field Value
    Type Description
    Single

    _period

    Declaration
    protected float _period
    Field Value
    Type Description
    Single

    allowMultipledEventsOfType

    Declaration
    protected bool allowMultipledEventsOfType
    Field Value
    Type Description
    Boolean

    eventName

    Name of the event.

    Declaration
    public string eventName
    Field Value
    Type Description
    String

    resetOnEachSampleCollection

    Declaration
    public bool resetOnEachSampleCollection
    Field Value
    Type Description
    Boolean

    Properties

    collector

    The delegate to use for collecting a metric to aggregate.

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

    dispatchDelegate

    The delegate to use for dispatching events.

    Declaration
    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
    Boolean

    Reset()

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

    Declaration
    public virtual void Reset()

    Update(Single)

    Declaration
    public virtual void Update(float deltaTime)
    Parameters
    Type Name Description
    Single deltaTime
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023