docs.unity3d.com
    Show / Hide Table of Contents

    Class CollectorBase

    Inheritance
    Object
    CollectorBase
    CaptureCollector
    SampleProfilerCollector
    TestCollector
    TestCounterEventCollector
    TestProfileSampleEventCollector
    Namespace: Unity.Simulation
    Syntax
    [Serializable]
    public abstract class CollectorBase

    Constructors

    CollectorBase()

    Declaration
    protected CollectorBase()

    Fields

    category

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

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

    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

    m_Enabled

    Field indicating if the collector is enabled.

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

    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
    Int32

    simulationElapsedTime

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

    Properties

    defaultDispatcherEnabled

    Returns if the default collector dispatcher is enabled.

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

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