Skip to content

Debology.Debby.Modules.Profile ​

IProfileModule Interface ​

The API for interacting with the Profile module. This can be accessed via Profile.

The profiler module allows viewing of stats from Unity's Profiler.

For a list of available categories and stat names see: - https://docs.unity3d.com/Manual/profiler-counters-reference.html - https://docs.unity3d.com/Manual/profiler-markers.html

In addition to the build in stats, you can add your own custom stats, and display them here. For more info see: - https://docs.unity3d.com/Manual/profiler-add-counters-code.html

csharp
public interface IProfileModule

Methods ​

IProfileModule.AddProfileStat(ProfilerCategory, string, string, string, float, float, float, GraphType) Method ​

Adds a new profile stat from Unity's Profiler.

csharp
void AddProfileStat(ProfilerCategory category, string statName, string title=null, string suffix=null, float minBound=-1f, float maxBound=-1f, float downsampleMagnitude=1f, Debology.Debby.Modules.Profile.GraphType graphType=Debology.Debby.Modules.Profile.GraphType.Line);

Parameters ​

category Unity.Profiling.ProfilerCategory

The category of the marker / counter

statName System.String

The name of the marker / counter

title System.String

An optional name override for the UI

suffix System.String

The suffix to display after the value

minBound System.Single

The lower bound of the graph or -1 to calculate automatically

maxBound System.Single

The upper bound of the graph or -1 to calculate automatically

downsampleMagnitude System.Single

How much to reduce the value by (e.g. the stat value will be divided by this)

graphType GraphType

What kind of graph to show

IProfileModule.Open() Method ​

Opens the Profile module.

csharp
void Open();

IProfileModule.RemoveProfileStat(ProfilerCategory, string) Method ​

Removes a profile graph from the UI.

csharp
void RemoveProfileStat(ProfilerCategory category, string statName);

Parameters ​

category Unity.Profiling.ProfilerCategory

The category of the marker / counter

statName System.String

The name of the marker / counter