GameWindow.GetWidth
Declaration
public int GetWidth();Возвращаемое значение
инт Ширина окна в пикселях.
Описание
Получить ширину окна.
using UnityEngine; using UnityEngine.Windowing;
public class WindowWidthExample : MonoBehaviour { void Start() { var window = GameWindow.Main; int width = window.GetWidth(); Debug.Log($"Window width: {width}"); } }