ドキュメント

Unity Engine

Unity Engine

GetWindows(List<GameWindow>)

Populates the provided list with all currently active windows in the application.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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()}"); } }}