Class SimulationProfilerBase
Abstract base MonoBehaviour for managing a collection of CollectorBase instances and driving simulation profiling.
Inherited Members
Namespace: Unity.SimulationPro
Assembly: Unity.SimulationPro.Capture.dll
Syntax
[DefaultExecutionOrder(-1)]
public abstract class SimulationProfilerBase : MonoBehaviour
Remarks
Subclass this and implement Properties and ApplySimulationConstantsProperties() to configure time scale and physics step. The concrete SimulationProfiler subclass is the standard implementation.
Fields
globalDispatcherOverride
Gets or sets a value indicating whether a global dispatcher overrides per-collector dispatchers.
Declaration
public bool globalDispatcherOverride
Field Value
| Type | Description |
|---|---|
| bool |
globalDispatchers
The globalDispatchers.
Declaration
[SerializeReference]
[HideInInspector]
public List<IGlobalProfilerDataDispatcher> globalDispatchers
Field Value
| Type | Description |
|---|---|
| List<IGlobalProfilerDataDispatcher> |
Properties
Properties
Gets the profiler configuration properties for this profiler.
Declaration
public abstract ProfilerProperties Properties { get; }
Property Value
| Type | Description |
|---|---|
| ProfilerProperties |
activeCollectors
Gets an enumerable of all collectors whose m_Enabled field is true.
Declaration
public IEnumerable<CollectorBase> activeCollectors { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<CollectorBase> |
collectors
Gets a read-only view of all registered collectors.
Declaration
public ReadOnlyCollection<CollectorBase> collectors { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<CollectorBase> |
Methods
AddCollector(CollectorBase)
Append a Collector to the end of the collector list.
Declaration
public void AddCollector(CollectorBase newCollector)
Parameters
| Type | Name | Description |
|---|---|---|
| CollectorBase | newCollector | The collector to add. |
ApplySimulationConstantsProperties()
Applies simulation constants from Properties to Unity's time settings.
Called during Start before profiling begins.
Declaration
public abstract void ApplySimulationConstantsProperties()
CreateCollector(Type)
Called by the "Add Collector" button in the scenario Inspector
Declaration
public CollectorBase CreateCollector(Type collectorType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | collectorType | The type of collector to create |
Returns
| Type | Description |
|---|---|
| CollectorBase | The newly created CollectorBase instance. |
Exceptions
| Type | Condition |
|---|---|
| Exception | Thrown when |
InsertCollector(int, CollectorBase)
Insert a collector at a given index within the randomizer list
Declaration
public void InsertCollector(int index, CollectorBase newCollector)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to place the randomizer |
| CollectorBase | newCollector | The collector to add to the list |
Exceptions
| Type | Condition |
|---|---|
| Exception | Thrown when a collector of the same type is already registered. |
RemoveCollector(int)
Remove collector at index.
Declaration
public void RemoveCollector(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the collector to remove. |