Parameter | Description |
---|---|
title | The new title for the window. |
AsyncOperation An AsyncOperation that represents the asynchronous operation.
Sets the title of the window.
using UnityEngine; using UnityEngine.Windowing;
public class SetWindowTitleExample : MonoBehaviour { AsyncOperation asyncOperation = null;
void Start() { var window = GameWindow.Main; asyncOperation = window.SetTitle("My Game Window"); }
void Update() { if (asyncOperation != null && asyncOperation.IsDone) { Debug.Log("Window title set successfully."); asyncOperation = null; } } }