public static GUILayoutOption Height (float height);

描述

传递给控件以使其具有绝对高度的选项。

注意:该选项将覆盖自动高度布局参数


Fixed Height for a GUI Control.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { GUILayout.Button("A Button with fixed height", GUILayout.Height(300)); } }