SetTitle(string)
Sets the title of the window.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Windowing
- Assembly: UnityEngine.WindowingModule
public AsyncOperation SetTitle(string title)
Parameters
The new title for the window.
Returns
Type | Description |
|---|---|
| AsyncOperation | An AsyncOperation that represents the asynchronous operation. |
Examples
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; } }}