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

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule
* **Inherits from:** [EditorWindow](/engine/6000.6/script-reference/unityeditor/editorwindow.md)
* **Implements:** [IHasCustomMenu](/engine/6000.6/script-reference/unityeditor/ihascustommenu.md)

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

## Static Fields

| Value                                                                                                    | Description                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [cpuModuleIdentifier](/engine/6000.6/script-reference/unityeditor/profilerwindow/cpumoduleidentifier.md) | The identifier of the [CPU Usage Profiler module](/engine/6000.6/manual/analysis/profiler/visualizing-data/cpu.md).                                 |
| [gpuModuleIdentifier](/engine/6000.6/script-reference/unityeditor/profilerwindow/gpumoduleidentifier.md) | The identifier of the [GPU Usage Profiler module](/engine/6000.6/manual/analysis/graphics-performance-profiling/profile-rendering/profiler-gpu.md). |

## Properties

| Property                                                                                                           | Description                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [firstAvailableFrameIndex](/engine/6000.6/script-reference/unityeditor/profilerwindow/firstavailableframeindex.md) | The index of the first frame available in the Profiler Window, or -1 if no frames are available.                                                                                                              |
| [lastAvailableFrameIndex](/engine/6000.6/script-reference/unityeditor/profilerwindow/lastavailableframeindex.md)   | The index of the last frame available in the Profiler Window, or -1 if no frames are available.                                                                                                               |
| [selectedFrameIndex](/engine/6000.6/script-reference/unityeditor/profilerwindow/selectedframeindex.md)             | The zero-based index of the frame currently selected in the Profiler Window.                                                                                                                                  |
| [selectedModuleIdentifier](/engine/6000.6/script-reference/unityeditor/profilerwindow/selectedmoduleidentifier.md) | The identifier of the [Profiler module](/engine/6000.6/script-reference/unityeditor/profilerwindow.md#modules) that is currently selected in the Profiler Window, or null if no Module is currently selected. |

## Methods

| Method                                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [GetFrameTimeViewSampleSelectionController](/engine/6000.6/script-reference/unityeditor/profilerwindow/getframetimeviewsampleselectioncontroller.md) | Retrieves an [IProfilerFrameTimeViewSampleSelectionController](/engine/6000.6/script-reference/unityeditor/profiling/iprofilerframetimeviewsampleselectioncontroller.md) object that you can use to control the selection in [Profiler modules](/engine/6000.6/script-reference/unityeditor/profilerwindow.md#modules) that are displaying timing information of Profiler Samples, such as the [CPU Usage module](/engine/6000.6/manual/analysis/profiler/visualizing-data/cpu.md) and the [GPU Usage Profiler module](/engine/6000.6/manual/analysis/graphics-performance-profiling/profile-rendering/profiler-gpu.md). |
| [SelectAndStayOnLatestFrame](/engine/6000.6/script-reference/unityeditor/profilerwindow/selectandstayonlatestframe.md)                               | 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](/engine/6000.6/script-reference/unityeditor/profilerwindow/selectedframeindexchanged.md) | Calls the methods in its invocation list when the Profiler window’s selected frame index changes. |

## Inheritance

**Inherited Members:**

* [EditorWindow.BeginWindows()](/engine/6000.6/script-reference/unityeditor/editorwindow/beginwindows.md)
* [EditorWindow.EndWindows()](/engine/6000.6/script-reference/unityeditor/editorwindow/endwindows.md)
* [EditorWindow.ShowNotification(GUIContent)](/engine/6000.6/script-reference/unityeditor/editorwindow/shownotification.md#shownotification\(guicontent\))
* [EditorWindow.ShowNotification(GUIContent, double)](/engine/6000.6/script-reference/unityeditor/editorwindow/shownotification.md#shownotification\(guicontent-double\))
* [EditorWindow.RemoveNotification()](/engine/6000.6/script-reference/unityeditor/editorwindow/removenotification.md)
* [EditorWindow.ShowTab()](/engine/6000.6/script-reference/unityeditor/editorwindow/showtab.md)
* [EditorWindow.Focus()](/engine/6000.6/script-reference/unityeditor/editorwindow/focus.md)
* [EditorWindow.ShowUtility()](/engine/6000.6/script-reference/unityeditor/editorwindow/showutility.md)
* [EditorWindow.ShowPopup()](/engine/6000.6/script-reference/unityeditor/editorwindow/showpopup.md)
* [EditorWindow.ShowModalUtility()](/engine/6000.6/script-reference/unityeditor/editorwindow/showmodalutility.md)
* [EditorWindow.ShowAsDropDown(Rect, Vector2)](/engine/6000.6/script-reference/unityeditor/editorwindow/showasdropdown.md)
* [EditorWindow.Show()](/engine/6000.6/script-reference/unityeditor/editorwindow/show.md#show\(\))
* [EditorWindow.Show(bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/show.md#show\(bool\))
* [EditorWindow.ShowAuxWindow()](/engine/6000.6/script-reference/unityeditor/editorwindow/showauxwindow.md)
* [EditorWindow.ShowModal()](/engine/6000.6/script-reference/unityeditor/editorwindow/showmodal.md)
* [EditorWindow.GetWindow(Type, bool, string, bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md)
* [EditorWindow.GetWindowWithRect(Type, Rect, bool, string)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindowwithrect.md)
* [EditorWindow.GetWindow\<T>()](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(\))
* [EditorWindow.GetWindow\<T>(bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(bool\))
* [EditorWindow.GetWindow\<T>(bool, string)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(bool-string\))
* [EditorWindow.GetWindow\<T>(string)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(string\))
* [EditorWindow.GetWindow\<T>(string, bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(string-bool\))
* [EditorWindow.GetWindow\<T>(bool, string, bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(bool-string-bool\))
* [EditorWindow.GetWindow\<T>(Type\[\])](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(type\))
* [EditorWindow.GetWindow\<T>(string, Type\[\])](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(string-type\))
* [EditorWindow.GetWindow\<T>(string, bool, Type\[\])](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindow.md#getwindowt\(string-bool-type\))
* [EditorWindow.CreateWindow\<T>(Type\[\])](/engine/6000.6/script-reference/unityeditor/editorwindow/createwindow.md#createwindowt\(type\))
* [EditorWindow.CreateWindow\<T>(string, Type\[\])](/engine/6000.6/script-reference/unityeditor/editorwindow/createwindow.md#createwindowt\(string-type\))
* [EditorWindow.HasOpenInstances\<T>()](/engine/6000.6/script-reference/unityeditor/editorwindow/hasopeninstances.md)
* [EditorWindow.FocusWindowIfItsOpen(Type)](/engine/6000.6/script-reference/unityeditor/editorwindow/focuswindowifitsopen.md)
* [EditorWindow.FocusWindowIfItsOpen\<T>()](/engine/6000.6/script-reference/unityeditor/editorwindow/focuswindowifitsopen.md)
* [EditorWindow.GetWindowWithRect\<T>(Rect)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindowwithrect.md#getwindowwithrectt\(rect\))
* [EditorWindow.GetWindowWithRect\<T>(Rect, bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindowwithrect.md#getwindowwithrectt\(rect-bool\))
* [EditorWindow.GetWindowWithRect\<T>(Rect, bool, string)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindowwithrect.md#getwindowwithrectt\(rect-bool-string\))
* [EditorWindow.GetWindowWithRect\<T>(Rect, bool, string, bool)](/engine/6000.6/script-reference/unityeditor/editorwindow/getwindowwithrect.md#getwindowwithrectt\(rect-bool-string-bool\))
* [EditorWindow.SaveChanges()](/engine/6000.6/script-reference/unityeditor/editorwindow/savechanges.md)
* [EditorWindow.DiscardChanges()](/engine/6000.6/script-reference/unityeditor/editorwindow/discardchanges.md)
* [EditorWindow.Close()](/engine/6000.6/script-reference/unityeditor/editorwindow/close.md)
* [EditorWindow.Repaint()](/engine/6000.6/script-reference/unityeditor/editorwindow/repaint.md)
* [EditorWindow.SendEvent(Event)](/engine/6000.6/script-reference/unityeditor/editorwindow/sendevent.md)
* [EditorWindow.GetExtraPaneTypes()](/engine/6000.6/script-reference/unityeditor/editorwindow/getextrapanetypes.md)
* [EditorWindow.TryGetOverlay(string, Overlay)](/engine/6000.6/script-reference/unityeditor/editorwindow/trygetoverlay.md)
* [EditorWindow.dataModeController](/engine/6000.6/script-reference/unityeditor/editorwindow/datamodecontroller.md)
* [EditorWindow.rootVisualElement](/engine/6000.6/script-reference/unityeditor/editorwindow/rootvisualelement.md)
* [EditorWindow.overlayCanvas](/engine/6000.6/script-reference/unityeditor/editorwindow/overlaycanvas.md)
* [EditorWindow.wantsMouseMove](/engine/6000.6/script-reference/unityeditor/editorwindow/wantsmousemove.md)
* [EditorWindow.wantsMouseEnterLeaveWindow](/engine/6000.6/script-reference/unityeditor/editorwindow/wantsmouseenterleavewindow.md)
* [EditorWindow.wantsLessLayoutEvents](/engine/6000.6/script-reference/unityeditor/editorwindow/wantslesslayoutevents.md)
* [EditorWindow.autoRepaintOnSceneChange](/engine/6000.6/script-reference/unityeditor/editorwindow/autorepaintonscenechange.md)
* [EditorWindow.maximized](/engine/6000.6/script-reference/unityeditor/editorwindow/maximized.md)
* [EditorWindow.hasFocus](/engine/6000.6/script-reference/unityeditor/editorwindow/hasfocus.md)
* [EditorWindow.docked](/engine/6000.6/script-reference/unityeditor/editorwindow/docked.md)
* [EditorWindow.focusedWindow](/engine/6000.6/script-reference/unityeditor/editorwindow/focusedwindow.md)
* [EditorWindow.mouseOverWindow](/engine/6000.6/script-reference/unityeditor/editorwindow/mouseoverwindow.md)
* [EditorWindow.hasUnsavedChanges](/engine/6000.6/script-reference/unityeditor/editorwindow/hasunsavedchanges.md)
* [EditorWindow.saveChangesMessage](/engine/6000.6/script-reference/unityeditor/editorwindow/savechangesmessage.md)
* [EditorWindow.minSize](/engine/6000.6/script-reference/unityeditor/editorwindow/minsize.md)
* [EditorWindow.maxSize](/engine/6000.6/script-reference/unityeditor/editorwindow/maxsize.md)
* [EditorWindow.titleContent](/engine/6000.6/script-reference/unityeditor/editorwindow/titlecontent.md)
* [EditorWindow.position](/engine/6000.6/script-reference/unityeditor/editorwindow/position.md)
* [EditorWindow.windowFocusChanged](/engine/6000.6/script-reference/unityeditor/editorwindow/windowfocuschanged.md)
* [ScriptableObject.CreateInstance(string)](/engine/6000.6/script-reference/unityengine/scriptableobject/createinstance.md#createinstance\(string\))
* [ScriptableObject.CreateInstance(Type)](/engine/6000.6/script-reference/unityengine/scriptableobject/createinstance.md#createinstance\(type\))
* [ScriptableObject.CreateInstance\<T>()](/engine/6000.6/script-reference/unityengine/scriptableobject/createinstance.md)
* [Object.GetEntityId()](/engine/6000.6/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.6/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.6/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.6/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.6/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.6/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.6/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.6/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.6/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.6/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.6/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.6/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.6/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.6/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.6/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.6/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.6/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.6/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.6/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.6/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.6/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.6/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
