Struct ProfilerCounter<T>
Reports a value of an integer or floating point type to the Unity Profiler.
Namespace: Unity.Profiling
Syntax
public readonly struct ProfilerCounter<T>
where T : struct
Type Parameters
Name | Description |
---|---|
T | int, uint, long, ulong, float or double type. |
Constructors
ProfilerCounter(ProfilerCategory, String, ProfilerMarkerDataUnit)
Constructs a ProfilerCounter that is reported to the Unity Profiler whenever you call Sample().
Declaration
public ProfilerCounter(ProfilerCategory category, string name, ProfilerMarkerDataUnit dataUnit)
Parameters
Type | Name | Description |
---|---|---|
ProfilerCategory | category | Profiler category. |
String | name | Name of ProfilerCounter. |
ProfilerMarkerDataUnit | dataUnit | Value unit type. |
Methods
Sample(T)
Sends the value to Unity Profiler immediately.
Declaration
public readonly void Sample(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to send to the profiler. |
Remarks
Does nothing in Release Players.