GetHeight()
Gets the height of the window.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine.Windowing
- Assembly: UnityEngine.WindowingModule
public int GetHeight()
Returns
Type | Description |
|---|---|
| int | The height of the window in pixels. |
Examples
using UnityEngine;using UnityEngine.Windowing;public class WindowHeightExample : MonoBehaviour{ void Start() { var window = GameWindow.Main; int height = window.GetHeight(); Debug.Log($"Window height: {height}"); }}