# SetWindowClass(GameWindow, string)

> Sets the QNX Screen window class for the specified window.

## Definition

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

```csharp
public static AsyncOperation SetWindowClass(this GameWindow window, string windowClass)
```

### Parameters

**** (\[GameWindow]\(/engine/6000.7/script-reference/unityengine/windowing/gamewindow)): The [GameWindow](/engine/6000.7/script-reference/unityengine/windowing/gamewindow.md) instance this extension method is implicitly called on.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The QNX Screen window class string. Must not be null or empty.

### Returns

| Type                                                                            | Description                                                                                      |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md) | An AsyncOperation that you can use to track the completion of the window class update operation. |

### Remarks

The QNX Screen window class string used to categorize and identify the window for Screen configuration and policy handling. Valid class names are system-defined and typically configured in the target device's graphics.conf. Throws an ArgumentException if the window class is null or empty.

**Notes**:

* This method is asynchronous and returns an `AsyncOperation` that you can use to track the completion of the operation.
* This method is available only on QNX platforms.

### Examples

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

public class SetWindowClassExample : MonoBehaviour
{
    void Start()
    {
        AsyncOperation op = GameWindow.Main.SetWindowClass("unity");

        op.completed += _ => {
            Debug.Log($"Window class set for {GameWindow.Main.GetTitle()}");
        };
    }
}
```
