Documentation

Unity Engine

Download Unity

Unity Engine

GetHeight()

Gets the height of the window.
Read time 1 minuteLast updated 2 months 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}"); }}