EditorGUILayout.EndVertical 结束垂直组

static function EndVertical () : void

Description描述

Close a group started with BeginVertical

结束一个由BeginVertical开始的组。

参见:EditorGUILayout.BeginVertical

EditorGUILayout.BeginVertical 开始垂直组

Vertical Compound group.
垂直混合组。

// Create a Vertical Compound Button
//创建一个垂直混合按钮 
class BeginEndVerticalExample extends EditorWindow {

	@MenuItem("Examples/Begin-End Vertical usage")
	static function Init() {
		var window = GetWindow(BeginEndVerticalExample);
		window.Show();
	}

	function OnGUI() {
		var r : Rect = EditorGUILayout.BeginVertical("Button");
		if (GUI.Button(r, GUIContent.none))
			Debug.Log("Go here");
		GUILayout.Label("I'm inside the button");
		GUILayout.Label("So am I");
		EditorGUILayout.EndVertical();
	}
}
最后修改:2011年7月14日 Thursday 20:31

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。