Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetHeight()

Gets the height of the window.
Read time 1 minuteLast updated 11 days ago

Definition

public int GetHeight()

Returns

Type

Description

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