Unity ngui adaptive screen resolution based on height

Source: Internet
Author: User

Unity version: 4.5.1 ngui version: 3.6.5

The content of this article is purely reprinted, reprinted with Reference Links and author

Reference: http://blog.csdn.net/asd237241291/article/details/8126619,CSDN de Morou

 

The ngui root directory's uiroot component comes with a highly adaptive resolution feature.

You can select three scaling policies for the scaling style attribute:
    1. Pixelperfect perfect pixels: displays the set pixels directly. Scaled down when the screen height is lower than minimum height, and scaled up when the screen height is greater than maximum height.
    2. Fixedsize scale proportionally: Scale proportionally based on the preset settings.
    3. Fixedsizeonmobiles in combination, Android and IoS are fixedsize, and others are in pixelperfect mode.

Fixedsize: ideal resolution height
Fixedsizeofwidth: the width of the ideal resolution

Manual height:Follow the ideal resolution. When the game view (the screen resolution After packaging) is not the ideal resolution, proportional scaling is performed.

Minimum Height: The game view scales proportionally below this value.
Maximum height: The game view scales proportionally above this value.

All the three scaling methods calculate the zooming ratio based on the height and ignore the width completely.

Unity ngui adaptive screen resolution based on height

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.