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:
- 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.
- Fixedsize scale proportionally: Scale proportionally based on the preset settings.
- 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