(4) unity4.6Ugui Chinese Document ------- overview-UGUI Visual Components, unity4.6ugui-ugui

Source: Internet
Author: User

(4) unity4.6Ugui Chinese Document ------- overview-UGUI Visual Components, unity4.6ugui-ugui

Hello everyone, I am Sun Guangdong. Reprinted please indicate the source: http://write.blog.csdn.net/postedit/38922399

More comprehensive content please see my game pretty cool address: http://www.unitymanual.com/forum.php? Mod = guide & view = my


3. Visual Components


New components and Game objects have been added to uGUI, allowing and easily creating GUI-specific features. This section describes the basis for creating new game objects.


Text 3.1


TheTextA component, also known as a tag, hasTextArea is used to enter the text to be displayed. It is a configurable font, Font Style, font size, and whether to use RichText.


Alignment of the text, automatic Wrap mode, and other options. The automatic line feed mode specifies what will happen when the label text cannot be contained if it is too large. The automatic line feed option means that the text will wrap to the next line, but it must be displayed in a space. Otherwise, any text beyond the rectangle will be cleared and not displayed, and Overflow will not wrap, A row cannot be placed on the external display. Truncate truncation exists vertically. The ResizeBounds option makes it suitable for the text size and automatic and dynamic labels. The final Best option scales the text size to fit the label height and width, and then it is wrapped like it is.


Currently, the text effect is limited, but a shadow with a specified color is created around the text. direction/distance can also be defined.


3.2 Image


Switch to an object with the Rect Transform component and Image component. A sprite can be applied to the SourceImage field under the Image component, and the main Color is set in the Color field. A material can also be used for Image components. The image type field defines how to display the genie of an application. The options include:


· SimpleSimple-The entire Sprite is displayed in the same size.


· SlicedCutting-Use 3x3The genie splits to adjust the size of the non-deformed corner.


· TiledTile-The boundaries of repeated genie game objects.


· FilledFill-Display Genie and SimpleIn addition to defining the direction, method, and quantity starting from the origin. Set Native SizeThis option (No)Set the original image size to the original sprite size. c.Value

Images can be imported as a uGUI genie, and Sprite (2D/uGUI) can be set by selecting from TextureType ). Compared with the old GUI genie, Sprites has been expanded. The biggest difference is the addition of sprite editor. The sprite editor provides the 9-slice option for the image, which divides the image into 9 regions so that it is used to adjust the sprite's hour-level corner without stretching or twisting.


Raw Image


The Image component requires an genie, but the Raw Image requires a texture (borderless ). It is necessary to use Raw Image unless the Image is applicable in most cases.


Mask


The mask is an invisible UI control and is used to modify the appearance of the child element of the control. The mask limits the shape of child elements in the parent object. Therefore, if the child is greater than the parent, only the portion within the parent is visible.


Effects


TODO describe how effects areused and what they can be applied.


Shadow


TODO


Outline


TODO


Position As UV1


TODO


 


 





Related Article

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.