"Turn" (iv) Unity4.6ugui Chinese course documentation-------Overview-ugui Visual components

Source: Internet
Author: User

Original first, please poke: (iv) Unity4.6ugui Chinese course documentation-------Overview-ugui Visual components

3、Visual Components

There are new components and game objects that have been added to Ugui, allowing and easy to create GUI-specific features. This section describes the basics of creating new game objects.

3.1 Text

The text component, also referred to as a label, has a textbox that is used to enter the texts that will be displayed. It is the ability to set the font, font style, font size, and whether to use RichText.

option settings such as text alignment alignment and wrapping wrap mode. The wrap mode specifies what happens if the text is too large to hold the label. The Wrap-wrapping option means that the text wraps to the next line, but there must be room to display, otherwise any text that goes out of the rectangle will be cleared and not displayed, and the overflow overflow does not wrap, and one line cannot be displayed outside the hold. There is truncate truncation on the vertical . The resizebounds option makes it suitable for text size, automatic, dynamic tagging. The last best option scales the text size to fit the label wide, and then it looks like it is wrapped.

The text effect is currently limited, but contains a shadow that creates a shadow of a specified color around the text, anddirection/distance can also be defined.

3.2 Image

Switch to an object that has a Rect transform component and an image component. An sprite sprite can be applied to the sourceimage field under the image component , and theColor field sets the main colors. A material can also be used for image components. The Image Type field defines how the app's sprite is displayed, with the following options:

· Simple Simple - the same size shows the whole sprite.

· sliced Cutting - using 3 x 3 sprites are segmented so as to adjust the size of the corners that are not deformed.

· tiled tiling - repeated sprites within the bounds of the game object.

· Filled Fill - Show sprites and simple simplicity in the same way, in addition to defining the direction, method, and quantity to be filled from the point of origin. Set Native Size this option ( not right ) to set the original size of the image to the original sprite size.c value

The images can be imported as a Ugui sprite by setting the Sprite (2d/ugui) from the TextureType selection. Compared with the old GUI wizard Sprites has expanded, the biggest difference is the addition of the sprite editor. The Sprite Editor provides a 9-slice option for the image , which divides the image into 9 regions so that the corners are not stretched or distorted in order to resize the sprite.

Raw Image

The image component requires a Sprite, but Raw image requires a texture (no boundaries, etc. ). It is necessary to use RAW image unless the image will work in most cases.

Mask

A mask is a UI control that is not visible, and is the appearance of a child element that modifies a control. The mask restricts the shape of the child element within the parent object. So, if the child is greater than the parent, then only the part within the parent will be visible.

Effects

TODO describe how effects areused and what they can is applied to.

Shadow

Todo

Outline

Todo

Position as UV1

Todo

"Turn" (iv) Unity4.6ugui Chinese course documentation-------Overview-ugui Visual components

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.