class in Unity.Profiling.Editor
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseProvides metadata related to a ProfilerModule, such as its name and icon path.
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) {} }
See Also: ProfilerModule.
DisplayName | The attributed Profiler module’s display name. |
IconPath | The path to the attributed Profiler module’s icon. |
ProfilerModuleMetadataAttribute | Initializes and returns an instance of ProfilerModuleMetadataAttribute. |