# Main

> Gets the main window of the application.

## Definition

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

```csharp
public static GameWindow Main { get; }
```

### Remarks

Returns the main window without allocating memory on repeated calls. This property is not thread-safe; use only from the main thread.

### Examples

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

public class MainWindowExample : MonoBehaviour
{
    void Start()
    {
        GameWindow mainWindow = GameWindow.Main;
        Debug.Log(mainWindow != null ? "Main window acquired." : "No main window.");
    }
}
```
