# CreateWindowAsyncOperation

> Asynchronous operation object returned from GameWindowManager.Create. This class extends AsyncOperation. You can yield until it continues, register an event handler with CreateWindowAsyncOperation.completed, or manually check whether it's done ( CreateWindowAsyncOperation.isDone ) or progress ( CreateWindowAsyncOperation.progress ).

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingGatedModule
* **Inherits from:** [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md)

```csharp
public sealed class CreateWindowAsyncOperation : AsyncOperation
```

## Remarks

The CreateWindowAsyncOperation class encapsulates the asynchronous window creation process. Once the operation is complete (isDone is true), you can access the created window through the [window](/engine/6000.7/script-reference/unityengine/windowing/createwindowasyncoperation/window.md) property.

Additional Resources: [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md), [GameWindowManager.Create](/engine/6000.7/script-reference/unityengine/windowing/gamewindowmanager/create.md).

## Examples

```csharp
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Windowing;

public class CreateWindowExample : MonoBehaviour
{
    List<DisplayInfo> displayInfos = new List<DisplayInfo>();

    void Start()
    {
        DisplayInfo.GetLayout(displayInfos);

        var settings = new GameWindowCreationSettings(
            title: "Second Window",
            width: 600, 
            height: 400,
            position: new Vector2Int(0, 0),
            cameraDisplayIndex: 1,
            displayInfo: displayInfos[0],
            fullScreenMode: FullScreenMode.Windowed,
            resizable: false
        );

        var op = GameWindowManager.Create(settings);

        op.completed += (AsyncOperation o) => { 
            Debug.Log($"Window Created: {op.window.GetTitle()}");
        };
    }
}
```

## Properties

| Property                                                                                             | Description                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [window](/engine/6000.7/script-reference/unityengine/windowing/createwindowasyncoperation/window.md) | Returns the created [GameWindow](/engine/6000.7/script-reference/unityengine/windowing/gamewindow.md) after the asynchronous operation completes. |

## Inheritance

**Inherited Members:**

* [AsyncOperation.isDone](/engine/6000.7/script-reference/unityengine/asyncoperation/isdone.md)
* [AsyncOperation.progress](/engine/6000.7/script-reference/unityengine/asyncoperation/progress.md)
* [AsyncOperation.priority](/engine/6000.7/script-reference/unityengine/asyncoperation/priority.md)
* [AsyncOperation.allowSceneActivation](/engine/6000.7/script-reference/unityengine/asyncoperation/allowsceneactivation.md)
* [AsyncOperation.completed](/engine/6000.7/script-reference/unityengine/asyncoperation/completed.md)
