EditorGUILayout 編輯器界面布局

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ù)

LabelField

Make a label field. (Useful for showing read-only info.)

制作一個標(biāo)簽字段。(通常用于顯示只讀信息)

Toggle

Make a toggle. // 制作開關(guān)按鈕帘睦。

TextField

Make a text field. // 制作一個文本字段袍患。

TextArea

Make a text area. // 制作一個文本區(qū)域。

SelectableLabel

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)

制作一個可選擇標(biāo)簽字段竣付。(通常用于顯示只讀信息诡延,可以被復(fù)制粘貼)

PasswordField

Make a text field where the user can enter a password.

創(chuàng)建一個文本字段,在那里用戶可以輸入密碼古胆。

FloatField

Make a text field for entering float values.

制作文本字段用于輸入浮點值肆良。

IntField

Make a text field for entering integers.

制作一個文本字段用于輸入整數(shù)。

Slider

Make a slider the user can drag to change a value between a min and a max.

制作一個滑動條用戶可以拖動來改變值逸绎,在最小和最大值之間惹恃。

IntSlider

Make a slider the user can drag to change an integer value between a min and a max.

制作一個滑動條用戶可以拖動來改變一個整數(shù)值,在最小和最大值之間桶良。

MinMaxSlider

Make a special slider the user can use to specify a range between a min and a max.

制作一個特殊滑動條座舍,用戶可以使用指定的范圍,在最小和最大值之間陨帆。

Popup

Make a generic popup selection field.

制作一個標(biāo)準(zhǔn)彈出選擇字段曲秉。

EnumPopup

Make an enum popup selection field.

制作一個枚舉彈出選擇字段。

IntPopup

Make an integer popup selection field.

制作一個整數(shù)彈出選擇字段疲牵。

TagField

Make a tag selection field.

制作一個標(biāo)簽選擇字段承二。

LayerField

Make a layer selection field.

制作一個層選擇字段。

ObjectField

Make an object field. You can assign objects either by drag'n drop objects or by selecting an object

制作一個物體字段纲爸『ヰ可以指定物體無論是通過拖拽物體或通過物體拾取器選擇物體。

ObjectField

Make an object drop slot field.

制作一個物體的拖拽槽字段识啦。

Vector2Field

Make an X & Y field for entering a Vector2.

制作X & Y字段用于輸入Vector2负蚊。

Vector3Field

Make an X, Y & Z field for entering a Vector3.

制作X , Y & Z字段用于輸入Vector3。

Vector4Field

Make an X, Y, Z & W field for entering a Vector4.

制作X, Y, Z & W字段用于輸入Vector4颓哮。

RectField

Make an X, Y, W & H field for entering a Rect.

制作 X, Y, W & H字段用于輸入矩形家妆。

BoundsField

Make Center & Extents field for entering a Bounds.

制作Center & Extents字段,用于輸入一個Bounds冕茅。

ColorField

Make a field for selecting a Color.

制作一個用于選擇顏色的字段伤极。

CurveField

Make a field for editing an AnimationCurve.

制作一個用于編輯動畫曲線的字段。

InspectorTitlebar

Make an inspector-window-like titlebar.

制作一個檢視面板的標(biāo)題欄姨伤。

Foldout

Make a label with a foldout arrow to the left of it.

制作一個左側(cè)帶有箭頭的折疊標(biāo)簽哨坪。

PrefixLabel

Make a label in front of some control.

制作一個在某些控件前面的標(biāo)簽。

Space

Make a small space between the previous control and the following.

在上一個控件和跟隨的控件之間乍楚,制作一個小的空距当编。

BeginToggleGroup

Begin a vertical group with a toggle to enable or disable all the controls within at once.

開始帶有開關(guān)按鈕的一個垂直組,在這里立即啟用或禁用控件徒溪。

EndToggleGroup

Close a group started with BeginToggleGroup

關(guān)閉BeginToggleGroup開始的組凌箕。

BeginHorizontal

Begin a horizontal group and get its rect back.

開始一個水平組并獲取返回矩形拧篮。

EndHorizontal

Close a group started with BeginHorizontal

關(guān)閉一個BeginHorizontal開始的組。

BeginVertical

Begin a vertical group and get its rect back.

開始一個垂直組并獲取它的返回矩形牵舱。

EndVertical

Close a group started with BeginVertical

結(jié)束一個由BeginVertical開始的組。

BeginScrollView

Begin an automatically layouted scrollview.

開始一個自動布局滾動視圖缺虐。

EndScrollView

Ends a scrollview started with a call to BeginScrollView.

結(jié)束一個由BeginScrollView開始的滾動視圖芜壁。

PropertyField

Make a field for SerializedProperty.

制作一個用于SerializedProperty的屬性字段。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末高氮,一起剝皮案震驚了整個濱河市慧妄,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌剪芍,老刑警劉巖塞淹,帶你破解...
    沈念sama閱讀 221,331評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異罪裹,居然都是意外死亡饱普,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,372評論 3 398
  • 文/潘曉璐 我一進店門状共,熙熙樓的掌柜王于貴愁眉苦臉地迎上來套耕,“玉大人,你說我怎么就攤上這事峡继》肱郏” “怎么了?”我有些...
    開封第一講書人閱讀 167,755評論 0 360
  • 文/不壞的土叔 我叫張陵碾牌,是天一觀的道長康愤。 經(jīng)常有香客問我,道長舶吗,這世上最難降的妖魔是什么征冷? 我笑而不...
    開封第一講書人閱讀 59,528評論 1 296
  • 正文 為了忘掉前任,我火速辦了婚禮裤翩,結(jié)果婚禮上资盅,老公的妹妹穿的比我還像新娘。我一直安慰自己踊赠,他們只是感情好呵扛,可當(dāng)我...
    茶點故事閱讀 68,526評論 6 397
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著筐带,像睡著了一般今穿。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上伦籍,一...
    開封第一講書人閱讀 52,166評論 1 308
  • 那天蓝晒,我揣著相機與錄音腮出,去河邊找鬼。 笑死芝薇,一個胖子當(dāng)著我的面吹牛胚嘲,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播洛二,決...
    沈念sama閱讀 40,768評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼馋劈,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了晾嘶?” 一聲冷哼從身側(cè)響起妓雾,我...
    開封第一講書人閱讀 39,664評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎垒迂,沒想到半個月后械姻,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,205評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡机断,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,290評論 3 340
  • 正文 我和宋清朗相戀三年楷拳,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片毫缆。...
    茶點故事閱讀 40,435評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡唯竹,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出苦丁,到底是詐尸還是另有隱情浸颓,我是刑警寧澤,帶...
    沈念sama閱讀 36,126評論 5 349
  • 正文 年R本政府宣布旺拉,位于F島的核電站产上,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏蛾狗。R本人自食惡果不足惜晋涣,卻給世界環(huán)境...
    茶點故事閱讀 41,804評論 3 333
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望沉桌。 院中可真熱鬧谢鹊,春花似錦、人聲如沸留凭。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,276評論 0 23
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽蔼夜。三九已至兼耀,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背瘤运。 一陣腳步聲響...
    開封第一講書人閱讀 33,393評論 1 272
  • 我被黑心中介騙來泰國打工窍霞, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人拯坟。 一個月前我還...
    沈念sama閱讀 48,818評論 3 376
  • 正文 我出身青樓但金,卻偏偏與公主長得像,于是被迫代替她去往敵國和親郁季。 傳聞我的和親對象是個殘疾皇子傲绣,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,442評論 2 359

推薦閱讀更多精彩內(nèi)容