GUILayout
- BeginArea
- BeginHorizontal
- BeginScrollView
- BeginVertical
- Box
- Button
- EndArea
- EndHorizontal
- EndScrollView
- EndVertical
- ExpandHeight
- ExpandWidth
- FlexibleSpace
- Height
- HorizontalScrollbar
- HorizontalSlider
- Label
- MaxHeight
- MaxWidth
- MinHeight
- MinWidth
- PasswordField
- RepeatButton
- SelectionGrid
- Space
- TextArea
- TextField
- Toggle
- Toolbar
- VerticalScrollbar
- VerticalSlider
- Width
- Window
GUILayout.Height 高度
static function Height (Height : float) : GUILayoutOption
Description描述
Option passed to a control to give it an absolute height.
传递给控件的选项,给它一个绝对的高度。
Note: This option will override the Automatic height Layout parameter
注意:这个选项将重写布局参数的自动高度。
Fixed Height for a GUI Control.
用于一个GUI控件的固定高度。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUILayout.Button("A Button with fixed height", GUILayout.Height(300));
}
}
// Draws a button with a fixed height
//绘制一个带有固定高度的按钮
function OnGUI() {
GUILayout.Button("A Button with fixed height", GUILayout.Height(300));
}
最后修改:2011年6月14日 Tuesday 15:10