# GetMainWindowCenteredPosition(Vector2)

> Returns a Rect to center a window on the main Unity Editor window.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
public static Rect GetMainWindowCenteredPosition(Vector2 size)
```

### Parameters

**** (\[Vector2]\(/engine/6000.7/script-reference/unityengine/vector2)): Size of the window to be centered.

### Returns

| Type                                                        | Description        |
| ----------------------------------------------------------- | ------------------ |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | Centered position. |
