static function Box (position : Rect, text : string) : void
static function Box (position : Rect, image : Texture) : void
static function Box (position : Rect, content : GUIContent) : void
static function Box (position : Rect, text : string, style : GUIStyle) : void
static function Box (position : Rect, image : Texture, style : GUIStyle) : void
static function Box (position : Rect, content : GUIContent, style : GUIStyle) : void
Description描述
Make a graphical box.
创建一个图形盒子。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUI.Box(new Rect(0, 0, Screen.width, Screen.height), "This is a title");
}
}
//创建一个屏幕大小的盒子
function OnGUI() {
GUI.Box(Rect(0,0,Screen.width,Screen.height),"This is a title");
}