Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

ProfilerModuleMetadataAttribute

class in Unity.Profiling.Editor

Suggest a change

Success!

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.

Close

Submission failed

For 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.

Close

Cancel

Description

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

Properties

Property Description
DisplayNameThe attributed Profiler module’s display name.
IconPathThe path to the attributed Profiler module’s icon.
TooltipThe tooltip text displayed when hovering over the module in the Profiler window.

Constructors

Constructor Description
ProfilerModuleMetadataAttributeInitializes and returns an instance of ProfilerModuleMetadataAttribute.