EditorGUI
- actionKey
- BoundsField
- ColorField
- CurveField
- DrawPreviewTexture
- DrawTextureAlpha
- DropShadowLabel
- EnumPopup
- FloatField
- Foldout
- indentLevel
- InspectorTitlebar
- IntField
- IntPopup
- IntSlider
- LabelField
- LayerField
- MinMaxSlider
- ObjectField
- PasswordField
- Popup
- PrefixLabel
- ProgressBar
- PropertyField
- RectField
- SelectableLabel
- Slider
- TagField
- TextArea
- TextField
- Toggle
- Vector2Field
- Vector3Field
- Vector4Field
EditorGUI.LabelField 标签字段
static function LabelField (position : Rect, label : string, label2 : string) : void
Parameters参数
-
positionRectangle on the screen to use for the label field.
屏幕上标签的矩形区域。 -
labelLabel in front of the label field.
在这个区域前的标签。 -
label2The label to show to the right.
显示在右侧的标签
Description描述
Make a label field. (Useful for showing read-only info.)
制作一个标签字段。(通常用于显示只读信息)
Shows a label in an editor window with the seconds since the editor started
在编辑器显示一个标签,自编辑器开始秒数。
// Shows a label in the editor with the seconds since the editor started
//显示一个自编辑器开始记秒的标签
class EditorGUILabelField extends EditorWindow {
@MenuItem("Examples/EditorGUI Label Usage")
static function Init() {
var window = GetWindow(EditorGUILabelField);
window.Show();
}
function OnGUI() {
EditorGUI.LabelField(Rect(3,3,position.width, 20),
"Time since start: ",
EditorApplication.timeSinceStartup.ToString());
this.Repaint();
}
}
最后修改:2011年6月22日 Wednesday 10:48