Game Development Reference
In-Depth Information
Walking through the Text component properties, we have the following:
Text : This is the text to be displayed on the screen.
Font : This decides which font to use from the list of imported fonts in
your project. By default, only Arial is supplied.
Unity supports a wide range of Font types and many can be imported
using Font Definition files and you can even create your own.
You can read more about Fonts in Unity at http://bit.ly/
Unity3DFonts .
As the font system is not changing in Unity 4.x, it isn't covered in great
depth in this topic.
Font Style : This decides whether the text will be in Bold , Italics , both ,
or just Normal .
Font Size : This decides the size of the font to be displayed (see the previous
note about the font system).
Line Spacing : This decides the spacing in-between font lines. By default all
text controls are multilined.
Rich Text : This Text control enables rich text drawing capabilities
(same as with legacy GUI, as detailed in Chapter 1 , Looking Back, Looking
Forward , in the Rich Text formatting section).
Alignment : This decides where the text is placed within the bounds of the
text control, such as left/right or top/bottom, and so on.
Horizontal Overflow : If the text is too big for the control to display, this
controls how the text should continue overflowing the control bounds.
This can be set to Overflow (continue on same line) or Wrap (continue the
next word on a new line).
Vertical Overflow : Like the Horizontal Overflow , the Vertical Overflow
controls how far down the screen the text will flow. This can be set to Overflow
(continue lines vertically) or Truncate (no further characters displayed).
If text doesn't fit vertically (either due to line breaks or wrapping) and
Vertical Overflow is set to Truncate , the lines that don't fit will be
entirely removed even if they fall a fraction outside the Text control
area. Only lines that completely fit within the box will be displayed in
this mode. (Courtesy of Adam Dawes, one of my excellent reviewers.)
 
Search WWH ::




Custom Search