GetHeight()
Gets the height of the window.
Read time 1 minuteLast updated 11 days ago
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}"); }}