Class DebugDisplayStats
Base class for Rendering Debugger Display Stats. Subclasses provide pipeline-specific lists of ProfilingSampler instances and register the corresponding debug UI widgets.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public abstract class DebugDisplayStats
Fields
averageProfilerTimingsOverASecond
Whether to display timings averaged over a second instead of updating every frame.
Declaration
protected bool averageProfilerTimingsOverASecond
Field Value
| Type | Description |
|---|---|
| bool |
hideEmptyScopes
Whether to hide empty scopes from UI.
Declaration
protected bool hideEmptyScopes
Field Value
| Type | Description |
|---|---|
| bool |
Methods
AddAndEnableProfilingSamplers(List<ProfilingSampler>)
Add Profiling Samplers to recorded list and enable them.
Declaration
protected void AddAndEnableProfilingSamplers(List<ProfilingSampler> samplers)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ProfilingSampler> | samplers | List of profiling samplers. |
BuildDetailedStatsList(string, List<ProfilingSampler>)
Helper function to build a list of sampler widgets for display stats.
Declaration
protected DebugUI.Widget BuildDetailedStatsList(string title, List<ProfilingSampler> samplers)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | Title for the stats list foldout. |
| List<ProfilingSampler> | samplers | List of samplers to display. |
Returns
| Type | Description |
|---|---|
| DebugUI.Widget | Foldout containing the list of sampler widgets. |
BuildProfilingSamplerWidgetList(IEnumerable<ProfilingSampler>)
Create an observable list of widgets from Profiling Samplers
Declaration
protected ObservableList<DebugUI.Widget> BuildProfilingSamplerWidgetList(IEnumerable<ProfilingSampler> samplers)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ProfilingSampler> | samplers | Profiling Sampler collection. |
Returns
| Type | Description |
|---|---|
| ObservableList<DebugUI.Widget> | An observable list of widgets. |
DisableProfilingRecorders()
Disable all active profiling recorders.
Declaration
public virtual void DisableProfilingRecorders()
EnableProfilingRecorders()
Enable profiling recorders.
Declaration
public virtual void EnableProfilingRecorders()
GetProfilingSamplersToDisplay(Type)
Collects all public static readonly ProfilingSampler fields from
markersType, skipping any decorated with
HideInDebugUIAttribute.
Declaration
protected static List<ProfilingSampler> GetProfilingSamplersToDisplay(Type markersType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | markersType | A static class containing ProfilingSampler fields
(e.g. |
Returns
| Type | Description |
|---|---|
| List<ProfilingSampler> | List of ProfilingSampler instances to display. |
RegisterDebugUI(List<Widget>)
Add display stats widgets to the list provided.
Declaration
public virtual void RegisterDebugUI(List<DebugUI.Widget> list)
Parameters
| Type | Name | Description |
|---|---|---|
| List<DebugUI.Widget> | list | List to add the widgets to. |
Update()
Update the timing data displayed in Display Stats panel.
Declaration
public virtual void Update()
UpdateDetailedStats(List<ProfilingSampler>)
Update the detailed stats.
Declaration
protected void UpdateDetailedStats(List<ProfilingSampler> samplers)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ProfilingSampler> | samplers | List of samplers to update. |