GUILayout.BeginVertical 开始垂直组

static function BeginVertical (params options : GUILayoutOption[]) : void
static function BeginVertical (style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (text : string, style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (image : Texture, style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (content : GUIContent, style : GUIStyle, params options : GUILayoutOption[]) : void

Parameters参数

Description描述

Begin a vertical control group.

开始一个垂直控件的组。

All controls rendered inside this element will be placed vertically below each other. The group must be closed with a call to EndVertical.

所有被渲染的控件,在这个组里一个接着一个被垂直放置。该组必须调用EndVertical关闭。

GUILayout.BeginVertical 开始垂直组

Vertical Layout. 垂直布局

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnGUI() {
		GUILayout.BeginVertical("box");
		GUILayout.Button("I'm the top button");
		GUILayout.Button("I'm the bottom button");
		GUILayout.EndVertical();
	}
}
function OnGUI () {
	// Starts a vertical group
	//开始一个垂直组
	
	GUILayout.BeginVertical ("box");

	GUILayout.Button ("I'm the top button");
	GUILayout.Button ("I'm the bottom button");

	GUILayout.EndVertical();
}
Page last updated: 2011-6-14