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.
Close Submission failedFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close Your name Your email Suggestion* Declarationpublic static void
Box(
Rect position, string
text);
Declarationpublic static void
Box(
Rect position,
Texture image);
Declarationpublic static void
Box(
Rect position,
GUIContent content);
Declarationpublic static void
Box(
Rect position, string
text,
GUIStyle style);
Parameters Parameter Description position Rectangle on the screen to use for the box. text Text to display on the box. image Texture to display on the box. content Text, image and tooltip for this box. style The style to use. If left out, thebox
style from the current GUISkin is used. Description
Create a Box on the GUI Layer.
A Box can contain text, an image, or a combination of these along with an optional tooltip, through using a GUIContent parameter. You may also use a GUIStyle to adjust the layout of items in a box, text colour and other properties.
Here is an example of a Box containing Text:
Here is an example of a Box containing a Texture:
Here is an example of a Box containing a GUIContent, combining Text, Texture and Tooltip:
Here is an example of a Box containing Text, with options set in a GUIStyle to position the Text in the center of the Box.
Here is an example of a Box containing a Texture, with options set in a GUIStyle to position the Texture in the center of the Box.
Finally, here is an example of a Box containing a GUIContent, combining Text, Texture and Tooltip, with positional information contained in the GUIStyle parameter:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4