GUILayout.Height

声明

public static GUILayoutOption Height(float height);

描述

传递给控件的选项,以赋予其绝对高度。

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


GUI 控件的固定高度。

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

Did you find this page useful? Please give it a rating: