ProfilerCounterDescriptor
Provides a descriptor for a Profiler counter.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Struct
- Namespace: Unity.Profiling.Editor
- Assembly: UnityEditor.CoreModule
public readonly struct ProfilerCounterDescriptor
Remarks
Used to describe a Profiler Counter or Profiler Counter Value, often within a ProfilerModule or ProfilerModuleViewController.
using System;using Unity.Profiling;using Unity.Profiling.Editor;[ProfilerModuleMetadata("Garbage Collection")]public class GarbageCollectionProfilerModule : ProfilerModule{ static readonly ProfilerCounterDescriptor[] k_ChartCounters = new ProfilerCounterDescriptor[] { new ProfilerCounterDescriptor("GC Reserved Memory", ProfilerCategory.Memory), new ProfilerCounterDescriptor("GC Used Memory", ProfilerCategory.Memory), new ProfilerCounterDescriptor("GC Allocated In Frame", ProfilerCategory.Memory), }; public GarbageCollectionProfilerModule() : base(k_ChartCounters) {}}
Additional Resources: ProfilerModule, ProfilerModuleViewController.
Constructors
Constructor | Description |
|---|---|
| ProfilerCounterDescriptor(System.String,System.String) | Initializes and returns an instance of ProfilerCounterDescriptor. |
| ProfilerCounterDescriptor(System.String,System.String,System.String) | Initializes and returns an instance of ProfilerCounterDescriptor with a description. |
| ProfilerCounterDescriptor(System.String,System.String,Unity.Profiling.ProfilerCategory) | Initializes and returns an instance of ProfilerCounterDescriptor with a description. |
| ProfilerCounterDescriptor(System.String,Unity.Profiling.ProfilerCategory) | Initializes and returns an instance of ProfilerCounterDescriptor. |
Properties
Property | Description |
|---|---|
| CategoryName | The category name of the described Profiler counter. |
| Description | The description of the described Profiler counter. |
| Name | The name of the described Profiler counter. |
Methods
Method | Description |
|---|---|
| ToString | Returns a string representation of the ProfilerCounterDescriptor. |