Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ProfilerModuleMetadataAttribute

Provides metadata related to a ProfilerModule, such as its name and icon path.
Read time 4 minutesLast updated 10 days ago

Definition

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]public class ProfilerModuleMetadataAttribute : Attribute

Remarks

You must attribute a ProfilerModule derived type with ProfilerModuleMetadataAttribute for Unity to display it in the Profiler window.
using System;using Unity.Profiling;using Unity.Profiling.Editor;[Serializable][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.

Constructors

Constructor

Description

ProfilerModuleMetadataAttribute(System.String)Initializes and returns an instance of ProfilerModuleMetadataAttribute.

Properties

Property

Description

DisplayNameThe attributed Profiler module’s display name.
IconPathThe path to the attributed Profiler module’s icon.

Inheritance

Inherited Members