---
title: GameWindowExtensions
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/windowing/windows/gamewindowextensions
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/windowing/windows/gamewindowextensions.md
last_updated: 2026-10-07
generated_at: 2026-11-12T01:43:45.806Z
locale: en-us
---

# GameWindowExtensions

> Provides extension methods for GameWindow specific to Windows.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Windowing.Windows](/engine/7000.0/script-reference/unityengine/windowing/windows.md)
* **Assembly:** UnityEngine.WindowsWindowingModule

```csharp
public static class GameWindowExtensions
```

## Remarks

Use the methods in this class to access Windows-specific properties of an existing [GameWindow](/engine/7000.0/script-reference/unityengine/windowing/gamewindow.md) instance, such as the underlying Win32 window handle.

## Examples

```csharp
using System;
using UnityEngine;
using UnityEngine.Windowing;
using UnityEngine.Windowing.Windows;

public class WindowsWindowExtensionsExample : MonoBehaviour
{
    void Start()
    {
        GameWindow window = GameWindow.Main;

        // Get the native window handle of the main game window using the extension method
        IntPtr hwnd = window.GetNativeHandle();

        Debug.Log($"Native handle for {window.GetTitle()}: {hwnd}");
    }
}
```

## Static Methods

| Method                                                                                                                   | Description                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetNativeHandle](/engine/7000.0/script-reference/unityengine/windowing/windows/gamewindowextensions/getnativehandle.md) | Obtains the native Win32 window handle of the specified window. This is an extension method for [GameWindow](/engine/7000.0/script-reference/unityengine/windowing/gamewindow.md). |
