(2) unity4.6 learn Ugui Chinese documents ------- overview-UGUI Canvas, ugui-ugui

Source: Internet
Author: User

(2) unity4.6 learn Ugui Chinese documents ------- overview-UGUI Canvas, ugui-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 workshop Workshop

The UI system allows you to quickly and intuitively create a user interface (Ui ). This is the main function of Unity's new UI system.

I. Overview of UI Overview

In this overview, we will go through the basic knowledge of the UI system. We will begin to introduceCanvas)And put all the UI elements in it, and useRect ToolAndRect TransformUI element layout. Then let's look at the visual element image.TextAndImage, And interactive controls, suchButtonButton andSliderSlider.

1. Canvas

CanvasA canvas is an area that holds all UI elements. A Canvas is a Canvas component on a game object. All UI elements must be sub-objects of the Canvas.

When you want to create a new UI element, such as Image, click Create in the menu:GameObject> UI> Image or Create-> UI-> Image on the Hierarchy panelAt the same time, a canvas is automatically created if a canvas already exists in the scene. After the newly created UI element Image is created, it is directly used as the existing canvas.

The canvas area is displayed as a rectangle in the scene view. This makes it easy to locate the UI elements, which can be seen at any time without a game view.

There is a Render mode setting on the canvas: screen space (overlay/Camare) or world space. You can set the render mode.

1.1 Screen Space-Overlay

In this rendering mode, the UI elements in the scene are rendered on the screen. If the screen size changes or the resolution is changed, the size of the canvas is automatically changed to match well.

UI in screen space overlay canvas

1.2 Screen Space-Overlay

This is similar to Screen Space-Overlay, but in this rendering mode, the canvas is placed at a given distance before the specified Camera. The specified Camera UI element is displayed, which means that the Camera settings will affect the UI display. If you set the Camera to Perspective, the UI element will be rendered under perspective, and the number of perspective distortion can be controlled by setting the Camera Field size for viewing. If the screen size is adjusted or the resolution or camera Cone range is changed, the size and matching of the canvas are automatically changed.

 

UI in screen space camera canvas

1.3 World Space

In this rendering mode, the canvas represents any other object in the scene. You can manually use its Rect Transform to set the size of the canvas, and the UI elements will be displayed before or after other objects in a 3D configuration-based scenario. This is useful for all UIS. They are part of world space and sometimes referenced as plot interfaces.

UI in world space canvas

Zookeeper
Ugui Unity3d version is available

Don't change the junk weapons of 43. I'm so distressed. It's not so bad !!!

Bi tegunii agacal! What does onodur sain ugui mean?

Unknown.
 

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.