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
- Type: Class
- Namespace: UnityEditor
- Assembly: UnityEditor
- Inherits from: EditorWindow
- Implements: IHasCustomMenu
[EditorWindowTitle(title = "Profiler", icon = "UnityEditor.ProfilerWindow")]public sealed class ProfilerWindow : EditorWindow, IHasCustomMenu
Static Fields
Value | Description |
|---|---|
| cpuModuleIdentifier | The identifier of the CPU Usage Profiler module. |
| gpuModuleIdentifier | The identifier of the GPU Usage Profiler module. |
Properties
Property | Description |
|---|---|
| firstAvailableFrameIndex | The index of the first frame available in the Profiler Window, or -1 if no frames are available. |
| lastAvailableFrameIndex | The index of the last frame available in the Profiler Window, or -1 if no frames are available. |
| selectedFrameIndex | The zero-based index of the frame currently selected in the Profiler Window. |
| selectedModuleIdentifier | The identifier of the Profiler module that is currently selected in the Profiler Window, or null if no Module is currently selected. |
Methods
Method | Description |
|---|---|
| GetFrameTimeViewSampleSelectionController | Retrieves 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. |
| SelectAndStayOnLatestFrame | Selects 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 |
|---|---|
| SelectedFrameIndexChanged | Calls the methods in its invocation list when the Profiler window’s selected frame index changes. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |