Version: 2023.2
言語: 日本語
public string IconPath ;

説明

The path to the attributed Profiler module’s icon.

Unity displays a Profiler module’s icon next to its name in the Profiler window. The recommended icon size at the specified path is 16x16 pixels. To provide a retina icon use the “@2x” suffix, as shown in the example below. To provide a dark-mode icon, use the “d_” prefix, as shown in the example below. If you're working in a package, use the package path scheme to reference the icon.

A string. Read-only.

// With the following icons present in the Assets/Icons directory of the project and an icon path of "Assets/Icons/GarbageCollectionIcon.png", Unity will load the appropriate icon depending upon the context.
// - Assets/Icons/GarbageCollectionIcon.png // 16 x 16 Standard Light Mode Icon
// - Assets/Icons/GarbageCollectionIcon@2x.png // 32 x 32 Retina Light Mode Icon
// - Assets/Icons/d_GarbageCollectionIcon.png // 16 x 16 Standard Dark Mode Icon
// - Assets/Icons/d_GarbageCollectionIcon@2x.png // 32 x 32 Retina Dark Mode Icon

using System; using Unity.Profiling; using Unity.Profiling.Editor;

[Serializable] [ProfilerModuleMetadata("Garbage Collection", IconPath = "Assets/Icons/GarbageCollectionIcon.png")] 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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961