Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Height(float)

Option passed to a control to give it an absolute height.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.IMGUIModule
public static GUILayoutOption Height(float height)

Parameters

height

Returns

Type

Description

GUILayoutOption

Remarks

Note: This option will override the Automatic height Layout parameter
GUILayoutHeight (Height(float))
Fixed Height for a GUI Control.

Examples

using UnityEngine;public class ExampleScript : MonoBehaviour{ // Draws a button with a fixed height void OnGUI() { GUILayout.Button("A Button with fixed height", GUILayout.Height(300)); }}