暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AdaptivePerformanceProfilerModule.cs 1.6KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using Unity.Profiling;
  3. using Unity.Profiling.Editor;
  4. namespace UnityEditor.AdaptivePerformance.Editor
  5. {
  6. [Serializable]
  7. [ProfilerModuleMetadata("Adaptive Performance")]
  8. internal class AdaptivePerformanceProfilerModule : ProfilerModule
  9. {
  10. static readonly ProfilerCounterDescriptor[] k_ChartCounters = new ProfilerCounterDescriptor[]
  11. {
  12. new ProfilerCounterDescriptor("CPU frametime", ProfilerCategory.Scripts),
  13. new ProfilerCounterDescriptor("GPU frametime", ProfilerCategory.Scripts),
  14. new ProfilerCounterDescriptor("CPU performance level", ProfilerCategory.Scripts),
  15. new ProfilerCounterDescriptor("GPU performance level", ProfilerCategory.Scripts),
  16. new ProfilerCounterDescriptor("Frametime", ProfilerCategory.Scripts),
  17. new ProfilerCounterDescriptor("Temperature Level", ProfilerCategory.Scripts),
  18. new ProfilerCounterDescriptor("Temperature Trend", ProfilerCategory.Scripts),
  19. };
  20. // Specify a list of Profiler category names, which should be auto-enabled when the module is active.
  21. static readonly string[] k_AutoEnabledCategoryNames = new string[]
  22. {
  23. AdaptivePerformanceProfilerStats.AdaptivePerformanceProfilerCategory.Name,
  24. };
  25. public override ProfilerModuleViewController CreateDetailsViewController()
  26. {
  27. return new AdaptivePerformanceDetailsViewController(ProfilerWindow);
  28. }
  29. public AdaptivePerformanceProfilerModule() : base(k_ChartCounters, ProfilerModuleChartType.Line, k_AutoEnabledCategoryNames) {}
  30. }
  31. }