お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closeposition | ボックスに使用するスクリーン上のRect |
text | ボックス上に表示するテキスト |
image | ボックス上に表示するTexture |
content | ボックスのテキスト、画像、ツールチップ |
style | 使用するスタイル。省略された場合は、現在のGUISkinにある box スタイルを使用します。 |
グラフィカルなボックス
// Draws a box of the size of the screen. function OnGUI() { GUI.Box(Rect(0,0,Screen.width,Screen.height),"This is a title"); }
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void OnGUI() { GUI.Box(new Rect(0, 0, Screen.width, Screen.height), "This is a title"); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def OnGUI() as void: GUI.Box(Rect(0, 0, Screen.width, Screen.height), 'This is a title')