Provides metadata for a ProfilerModule, including its display name, tooltip, and icon.
Apply this attribute to a ProfilerModule derived class to configure how it appears in the Profiler window. The attribute is required for Unity to discover and display custom Profiler modules. You can customize the module's appearance by setting the DisplayName, Tooltip, and IconPath properties.
using System; using Unity.Profiling; using Unity.Profiling.Editor;
[ProfilerModuleMetadata( "Network Statistics", Tooltip = "Displays network packet statistics and bandwidth usage", IconPath = "Assets/Icons/NetworkProfilerIcon.png" )] public class NetworkProfilerModule : ProfilerModule { static readonly ProfilerCounterDescriptor[] k_ChartCounters = new ProfilerCounterDescriptor[] { new ProfilerCounterDescriptor("Packets Sent", "Network"), new ProfilerCounterDescriptor("Packets Received", "Network"), };
public NetworkProfilerModule() : base(k_ChartCounters) {} }
Additional resources: ProfilerModule, ProfilerModuleViewController.
| Property | Description |
|---|---|
| DisplayName | The attributed Profiler module’s display name. |
| IconPath | The path to the attributed Profiler module’s icon. |
| Tooltip | The tooltip text displayed when hovering over the module in the Profiler window. |
| Constructor | Description |
|---|---|
| ProfilerModuleMetadataAttribute | Initializes and returns an instance of ProfilerModuleMetadataAttribute. |