EditorGUILayout 編輯器界面布局
Auto-layouted version ofEditorGUI
EditorGUI的自動布局版本尤勋。
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:這是一個編輯器類,如果想使用它你需要把它放到工程目錄下的Assets/Editor文件夾下宫盔。編輯器類在UnityEditor命名空間下。所以當(dāng)使用C#腳本時纺蛆,你需要在腳本前面加上 "using UnityEditor"引用逞度。
Class Functions類函數(shù)
Make a label field. (Useful for showing read-only info.)
制作一個標(biāo)簽字段。(通常用于顯示只讀信息)
Make a toggle. // 制作開關(guān)按鈕帘睦。
Make a text field. // 制作一個文本字段袍患。
Make a text area. // 制作一個文本區(qū)域。
Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
制作一個可選擇標(biāo)簽字段竣付。(通常用于顯示只讀信息诡延,可以被復(fù)制粘貼)
Make a text field where the user can enter a password.
創(chuàng)建一個文本字段,在那里用戶可以輸入密碼古胆。
Make a text field for entering float values.
制作文本字段用于輸入浮點值肆良。
Make a text field for entering integers.
制作一個文本字段用于輸入整數(shù)。
Make a slider the user can drag to change a value between a min and a max.
制作一個滑動條用戶可以拖動來改變值逸绎,在最小和最大值之間惹恃。
Make a slider the user can drag to change an integer value between a min and a max.
制作一個滑動條用戶可以拖動來改變一個整數(shù)值,在最小和最大值之間桶良。
Make a special slider the user can use to specify a range between a min and a max.
制作一個特殊滑動條座舍,用戶可以使用指定的范圍,在最小和最大值之間陨帆。
Make a generic popup selection field.
制作一個標(biāo)準(zhǔn)彈出選擇字段曲秉。
Make an enum popup selection field.
制作一個枚舉彈出選擇字段。
Make an integer popup selection field.
制作一個整數(shù)彈出選擇字段疲牵。
Make a tag selection field.
制作一個標(biāo)簽選擇字段承二。
Make a layer selection field.
制作一個層選擇字段。
Make an object field. You can assign objects either by drag'n drop objects or by selecting an object
制作一個物體字段纲爸『ヰ可以指定物體無論是通過拖拽物體或通過物體拾取器選擇物體。
Make an object drop slot field.
制作一個物體的拖拽槽字段识啦。
Make an X & Y field for entering a Vector2.
制作X & Y字段用于輸入Vector2负蚊。
Make an X, Y & Z field for entering a Vector3.
制作X , Y & Z字段用于輸入Vector3。
Make an X, Y, Z & W field for entering a Vector4.
制作X, Y, Z & W字段用于輸入Vector4颓哮。
Make an X, Y, W & H field for entering a Rect.
制作 X, Y, W & H字段用于輸入矩形家妆。
Make Center & Extents field for entering a Bounds.
制作Center & Extents字段,用于輸入一個Bounds冕茅。
Make a field for selecting a Color.
制作一個用于選擇顏色的字段伤极。
Make a field for editing an AnimationCurve.
制作一個用于編輯動畫曲線的字段。
Make an inspector-window-like titlebar.
制作一個檢視面板的標(biāo)題欄姨伤。
Make a label with a foldout arrow to the left of it.
制作一個左側(cè)帶有箭頭的折疊標(biāo)簽哨坪。
Make a label in front of some control.
制作一個在某些控件前面的標(biāo)簽。
Make a small space between the previous control and the following.
在上一個控件和跟隨的控件之間乍楚,制作一個小的空距当编。
Begin a vertical group with a toggle to enable or disable all the controls within at once.
開始帶有開關(guān)按鈕的一個垂直組,在這里立即啟用或禁用控件徒溪。
Close a group started with BeginToggleGroup
關(guān)閉BeginToggleGroup開始的組凌箕。
Begin a horizontal group and get its rect back.
開始一個水平組并獲取返回矩形拧篮。
Close a group started with BeginHorizontal
關(guān)閉一個BeginHorizontal開始的組。
Begin a vertical group and get its rect back.
開始一個垂直組并獲取它的返回矩形牵舱。
Close a group started with BeginVertical
結(jié)束一個由BeginVertical開始的組。
Begin an automatically layouted scrollview.
開始一個自動布局滾動視圖缺虐。
Ends a scrollview started with a call to BeginScrollView.
結(jié)束一個由BeginScrollView開始的滾動視圖芜壁。
Make a field for SerializedProperty.
制作一個用于SerializedProperty的屬性字段。