Hello everyone. I'm Sun Guangdong.
Reprint Please specify source: http://write.blog.csdn.net/postedit/38922399
More full content Please see my game Bull address: http://www.unitymanual.com/forum.php?mod=guide&view=my
3 ,Visual components
There are new components and game objects that have been added to the Ugui . Agree and easy to create GUI - specific features.
This section describes the basics of creating new game objects.
3.1 Text
the Text components. Also known as a label. There is a text area for the input that will be displayed.
It is the ability to set the font, font style, font size, and whether to use richtext .
how text is aligned Alignment and take your own initiative to wrap wrap . mode, and other options settings.
Self-initiated line break mode specifies that the hypothesis is too large. What happens when the text of the label cannot be accommodated. Your own active line-wrapping option means that the text will wrap to the next line, but there must be room to display, otherwise no matter what the text beyond the rectangle will be cleared and not displayed, there is Overflow Overflow does not wrap, a row can not be held outside the display.
There is truncate truncation on the vertical .
Resizebounds option to make the text fit to the size of your own initiative, Dynamic Labels. The last best option scales the text size to fit the label height. Then it's like being packaged.
The text effect is now limited, but involves creating a shadow of a specified color around the text,direction/distance can also be defined.
3.2 Image
switch to a Rect Transform components and on the object of the component.
A sprite sprite can be applied to the Image component under sourceimage field, Set the primary color in the Color field. 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 entire sprite.
· sliced split - using 3 x 3 The sprite cuts in order to adjust the size of the corners without distortion.
· tiled tiling - repeated sprites within the bounds of the game object.
· Filled Fill - Show sprites and simple simplicity the same way. It defines the direction, method and quantity to be filled from the point of origin. Set Native Size This option ( No, No. ) to set the original size of the image to the original sprite size.c value
Images able to act as Ugui Wizard Import, through the texturetype Select Set Sprite (2d/ugui ). With the old GUI Elves compared to Sprites with the extension, the biggest difference is the addition of the Sprite editor . Sprite Editor provides 9 for images slice option, which divides the image into 9 region, so. In order to adjust the sprite size, the corners are not stretched or twisted.
Raw Image
Image component requires an elf, but Raw Image required is texture ( No Boundaries, etc. ) .
It is necessary to use Raw Image . Unless the image is used in most cases.
Mask
The mask is not visible in the UI control, which is the appearance of the child elements of the change control.
The mask restricts the shape of the child element within the parent object. So. Assume that the child is greater than the parent, and 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
(iv) Unity4.6ugui Chinese course documentation-------Overview-ugui Visual components