GameWindow The main GameWindow instance.
Gets the main window of the application.
Returns the main window without allocating memory on repeated calls. This property is not thread-safe; use only from the main thread.
using UnityEngine; using UnityEngine.Windowing;
public class MainWindowExample : MonoBehaviour { void Start() { GameWindow mainWindow = GameWindow.Main; Debug.Log(mainWindow != null ? "Main window acquired." : "No main window."); } }