# SetZOrder(GameWindow, int)

> Sets the z-order for the specified window on QNX. This is an extension method for GameWindow.

## Definition

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

```csharp
public static AsyncOperation SetZOrder(this GameWindow window, int zOrder)
```

### 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.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The z-order value. Higher values appear on top of lower values.

### Returns

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

### Remarks

The z-order determines whether the window displays in front of or behind other windows. Higher values place the window on top of windows with lower values.

**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 SetZOrderExample : MonoBehaviour
{
    void Start()
    {
        AsyncOperation op = GameWindow.Main.SetZOrder(10);

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