static function LabelField (label : string, label2 : string, params options : GUILayoutOption[]) : void
Description描述
Make a label field. (Useful for showing read-only info.)
制作一个标签字段。(通常用于显示只读信息)
Shows a label in the editor (Label) with the seconds since the editor started (Label2).
在编辑器显示一个标签,带有自编辑器开始秒数。
// Shows a label in the editor with the seconds since the editor started
//在编辑器显示一个标签,带有自编辑器开始的秒数
class EditorGUILayoutLabel extends EditorWindow {
@MenuItem("Examples/Editor GUILayout Label Usage")
static function Init() {
var window = GetWindow(EditorGUILayoutLabel);
window.Show();
}
function OnGUI() {
EditorGUILayout.LabelField("Time since start: ",
EditorApplication.timeSinceStartup.ToString());
this.Repaint();
}
}