# FocusWindowIfItsOpen

> Focuses the first found EditorWindow of specified type if it is open.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## FocusWindowIfItsOpen(Type)

Focuses the first found EditorWindow of specified type if it is open.

```csharp
public static void FocusWindowIfItsOpen(Type t)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)):&#x20;

### Remarks

If there is no open window of such type, nothing happens.

## FocusWindowIfItsOpen\<T>()

Focuses the first found EditorWindow of type `T` if it is open.

```csharp
public static void FocusWindowIfItsOpen<T>() where T : EditorWindow
```

### Remarks

If there is no open window of such type, nothing happens.
