# GetPosition()

> Gets the position of the window relative to the top-left corner of the screen.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingModule

```csharp
public Vector2Int GetPosition()
```

### Returns

| Type                                                                    | Description                                                                                                           |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [Vector2Int](/engine/6000.7/script-reference/unityengine/vector2int.md) | A [Vector2Int](/engine/6000.7/script-reference/unityengine/vector2int.md) that represents the position of the window. |

### Examples

```csharp
using UnityEngine;
using UnityEngine.Windowing;

public class WindowPositionExample : MonoBehaviour
{
    void Start()
    {
        var window = GameWindow.Main;
        Vector2Int pos = window.GetPosition();
        Debug.Log($"Window position: {pos.x}, {pos.y}");
    }
}
```
