Unity3d Ugui Interface Adaptation case analysis three kinds of adaptation methods

Source: Internet
Author: User

Before doing games are used by the company's own engine, the interface for the adaptation of Android and iOS two kinds of system processing.

For iOS devices, because of the limited number, as long as the 960x640 1024x769 1136x640 (there is no iphone6) three kinds of adaptation can be, so we have three kinds of screens do three different interface configuration files.

For Android devices, the screen resolution is too many, so the unification is set to 1136x640 scale.

Now using unity to make the game, although the original set of scenarios can still be used, but it does not seem necessary.

The Unity4.6 new Ugui provides three basic interface adaptation schemes.

Let's add an image first so that a canvas will be created automatically. Look at the property settings for the canvas.

Canvas Scaler is used to do the matching

Reference resolution represents the screen size we use when we design the interface.

Screen Match mode has three options, i.e. three interface adaptation schemes.

Shrink maintain the scale, crop expand scale does not crop match width screen size if it is match widths then it is the appropriate size, set the width to the display width, and then maintain the proportional height if match height, Set the height to the screen height first, and then keep the proportions

Unity3d Ugui Interface Adaptation case analysis three kinds of adaptation methods

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.