文档

Unity Engine

Unity Engine

ProfilerCounterDescriptor

Provides a descriptor for a Profiler counter.
阅读时间1 分钟最后更新于 1 个月前

Definition

public readonly struct ProfilerCounterDescriptor

Remarks

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) {}}

Constructors

Properties

Property

Description

CategoryNameThe category name of the described Profiler counter.
DescriptionThe description of the Profiler counter.
DisplayNameOptional displayName to enable Profiler modules to specify display names.
NameThe name of the described Profiler counter.

Methods

Method

Description

ToStringReturns a string representation of the ProfilerCounterDescriptor.