ドキュメント

Unity Engine

Unity Engine

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 ).
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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 property.

Examples

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

windowReturns the created GameWindow after the asynchronous operation completes.

Inheritance