# GameWindowExtensions

> Provides extension methods for GameWindow specific to Windows.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Windowing.Windows](/engine/6000.7/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/6000.7/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/6000.7/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/6000.7/script-reference/unityengine/windowing/gamewindow.md). |
