Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ProfilerWindow

Use the ProfilerWindow class for interactions with the Profiler Window such as checking which frame it currently shows and controlling the selected Profiler sample in the CPU or GPU Usage Modules.
Read time 8 minutesLast updated 2 days ago

Definition

[EditorWindowTitle(title = "Profiler", icon = "UnityEditor.ProfilerWindow")]public sealed class ProfilerWindow : EditorWindow, IHasCustomMenu

Static Fields

Value

Description

cpuModuleIdentifierThe identifier of the CPU Usage Profiler module.
gpuModuleIdentifierThe identifier of the GPU Usage Profiler module.

Properties

Property

Description

firstAvailableFrameIndexThe index of the first frame available in the Profiler Window, or -1 if no frames are available.
lastAvailableFrameIndexThe index of the last frame available in the Profiler Window, or -1 if no frames are available.
selectedFrameIndexThe zero-based index of the frame currently selected in the Profiler Window.
selectedModuleIdentifierThe identifier of the Profiler module that is currently selected in the Profiler Window, or null if no Module is currently selected.

Methods

Method

Description

GetFrameTimeViewSampleSelectionControllerRetrieves an IProfilerFrameTimeViewSampleSelectionController object that you can use to control the selection in Profiler modules that are displaying timing information of Profiler Samples, such as the CPU Usage module and the GPU Usage Profiler module.
SelectAndStayOnLatestFrameSelects the newest frame that was profiled and if newer frames are profiled or loaded into the profiler window, the Profiler Window will keep showing the newest frame of these.

Events

Member

Description

SelectedFrameIndexChangedCalls the methods in its invocation list when the Profiler window’s selected frame index changes.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.