用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:guilayout.verticalscope:guilayout.verticalscope

VerticalScope 垂直范围

class in UnityEngine

Description 描述

Disposable helper class for managing BeginVertical / EndVertical.

为了管理BeginVertical / EndVertical的可支配的助手类。

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

所有控制台内渲染的元素都将被垂直放置与彼此的下方。该组在调用EndVertical后必须被关闭。

Vertical Layout.

JavaScript:

no example available in JavaScript

C#:

using UnityEngine;
 
public class ExampleClass : MonoBehaviour {
    void OnGUI() {
		// Starts a vertical group
		using (var verticalScope = new VerticalScope("box")) {
	        GUILayout.Button("I'm the top button");
    	    GUILayout.Button("I'm the bottom button");
        }
		// The group is now ended
    }
}

Constructors

GUILayout.VerticalScopeCreate a new VerticalScope and begin the corresponding vertical group.
创建新的垂直范围并形成相对应的垂直范围组。
script/unityengine/classes/guilayout.verticalscope/guilayout.verticalscope.txt · 最后更改: 2016/08/02 05:27 (外部编辑)