Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetWindows(List<GameWindow>)

Populates the provided list with all currently active windows in the application.
Read time 1 minuteLast updated 12 days ago

Definition

public static void GetWindows(List<GameWindow> windows)

Parameters

A List to be populated with GameWindow objects representing all available windows.

Examples

using System.Collections.Generic;using UnityEngine;using UnityEngine.Windowing;public class GetWindowsExample : MonoBehaviour{ List<GameWindow> windows = new List<GameWindow>(); void Start() { GameWindowManager.GetWindows(windows); Debug.Log($"Total windows: {windows.Count}"); foreach (var window in windows) { Debug.Log($"Window: {window.GetTitle()}, Size: {window.GetWidth()}x{window.GetHeight()}"); } }}