NGUI 界面自适应

关于 NGUI 的界面自动适应不同的手机分辨率,网上已经够多的了。如果你点进了这个网页,推荐一下这一篇吧:

http://www.xuanyusong.com/archives/2536

下面是我自己的总结:

首先,为什么手机游戏不要使用 UIRoot.PixelPerfect?

这个选项会使图片按照原始的大小显示在手机上。会有什么问题呢? iPhone 3GS 分辨率是 480x320,iPhone 4 是 960x640。也就是说,宽高刚好1:2的关系。如果使用了 PixelPerfect ,你会发现,在 iPhone 3GS 上面的界面“看起来”比 iPhone 4 大一倍。太丑了。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeYAAABuCAIAAAB9ZSeZAAAgAElEQVR4nO2de3ATV5roPZe7lbq5d7mV3aIucyu52bW3UrsByhBkuyW13g9bkt/vF8aW38Y2lrGNzcPGYCzkFxjLONjElm380MOSLPfMZDKThE3YSSZkJkPIJIE8ICSBEAgQspPa3Lsp7h89dNrdLVmthy3D9ysV1fr6nNOnhfXT0VGf/sIQAAAAYDXA4/HCVroPAAAAgFewVvaGDRvC3bBhw4bo6OggdRQAACBk+bu/W89PLP+HyMRnedmbBPlbxNqtCm2UskigLpUmVckSy2OVWQE5EGtlh4eHf/3Nndt3v7397Xd3vv3u7r3v7t777uq1G+9e/HT33rYNGzZERUUFpGcAAACrgv/zj1v48eXNR0zf3PuP+27Q5Da4q87lcjs7Ozs7O7lc7pLH8kXZX3x189rXt766+c2NW3e+/ubOzdt3b96+e+nK529duLj/YOeGDRs4HA6llkajqaur6yPR+4Axk+mHH344e/ZsTEwMq54AAACEAv/1b3/+2vnr2xqMtR2T2uah3b2WEzOv/OLs++cv37xy894P//njjz/+KM2mKpvL5aampnZ2dqIo+uKLL7744osoinZ2dqampnpwty/KvnrtBmHtl/78uf2dy298fP3m7buXLn/+1oWLbYe7NmzYQK4SExOj1WobGxvLy8uLioq0izl//vwPP/wwNDQc4pMqxcXFGIb19/evVAeOHz+OYVhxcfFKdQAAAEZ+9tjf/+7iNxk7ui1nPj40eubQ6Jn9J37V0G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vHF2seOHaOvY1AJAaampiQSCdp2Z21qYk5XcGFh4fHjxwcGBth16VBxuVxut9upeHd3d1lZWVdXl+daiOLiYqqkfxfQ/cVyZpTu4pRt3R1leN/bfpeZy2ZFHerVCwUA6x+vrU0QhMPhoGa1SqXS4XAQBIFhWE9PT2VlpUQiyc/Pd2ltq9WalZUllUr37NlDBRsaGqRSaXR0NJU8zF36GJIktVqtWCx+/PHH29raqHhBQcHExEReXp7LAaOORCJRVFRUTU2NzWajTiNZn9YORCCXDQCsGl5bOy8vj0o5hujp6UHGjImJGRoampiYaG5udvfDo81mGx8fb2hooIJtbW0TExNWq7WwsBBF3KWPmZub6+/vdzqd3d3d9MUQqVRqt9tFIpHLAaMvBHNzczabjX3mn7vyIG6vgFw2ALBqrPi1kcnJyTabbeXaxzAMZYtf0S4Az7Bz2bDxkMsGAADurKy1JycnJyYmSkpKVqh9DMNwHD9z5ozLFRVg1eDz+excNmKxmGMuGwAAuAP3IQH8QFhYGI7jjFw2ChoectkAAOAVYG3ADwgEglvZt5IAAAA4SURBVNDQ0JCQkO1uCAkJcZnLBgAAbwFrA/7BXS4bhMtcNgAA+ABYGwAAIJAAawMAAAQSQqHw/wMC5zHmgM2OTAAAAABJRU5ErkJggg==" alt="" />

其次,需要知道的是,一定要保证界面显示在手机上时,宽和高一定要等比缩放,否则会很丑。

既然需要等比缩放,那么必然会牵扯到一个问题,手机的分辨各不相同,怎么保证等比缩放?为了方便说明,假设设置设计分辨率是w/h=1/1。手机分辨率是w/h=1/1.2。

如果你选择“充满”w,那么,并且 h 方向上内容居中,那么,h 的两端就会填不满,造成“黑边”的情况。如果选择“充满”h,那么更糟糕,w方向上的内容有20%的内容无法显示在屏幕中,因为超出去了。

我们称填满后,会造成另一个方向上填不满的情况的那一个方向叫做”小边“,而填满之后会造成另一个方向内容超出屏幕的那一个方向叫做”大边“。那么在这个例子中,w就是小边,h就是大边。

内容被截断是无法接受的,所以通常的选择是,“充满”小边,使大边方向上的2端出现黑边,然后再想办法把黑边填充点内容,保证整个屏幕都有内容可以看。这个方案可以叫做《填充小的,居中大的,填充大的两端》

注意,不一定 w 是较小的那个,有的手机是 w,有的手机是 h。这取决于手机分辨率比例与设计分辨率之间的关系。所以我们需要在程序中加判断,决定哪一边是小边,哪一边是大边。

看上图,NGUI 只支持基于 Height 的缩放,也就是说,他只支持把 h 做为小边。这个是无法满足我们的需求的。以下是我的代码,是从最上面的链接里参考过来的,把这个脚本附加到 UIRoot 对象上就可以工作了:

 1 using UnityEngine;
2 using System.Collections;
3
4 [RequireComponent(typeof(UIRoot))]
5 public class AdaptableUI : MonoBehaviour
6 {
7 public int manualWidth = 960;
8 public enum CallWhere
9 {
10 Awake,// call only once
11 Start,// call only once
12 Update,// call when change
13 }
14 public CallWhere callWhere = CallWhere.Awake;
15
16 public enum AdaptType
17 {
18 BasedOnHeight,
19 BasedOnWidth,
20 }
21 [HideInInspector]
22 [System.NonSerialized]
23 public AdaptType adaptType = AdaptType.BasedOnHeight;
24
25 private int cachedScreenWidth;
26 private int cachedScreenHeight;
27 private int originalManualHeight;
28 private UIRoot uiroot;
29
30 void Awake()
31 {
32 cachedScreenWidth = 0;
33 cachedScreenHeight = 0;
34 uiroot = GetComponent<UIRoot>();
35
36 if (uiroot.scalingStyle != UIRoot.Scaling.FixedSize)
37 {
38 enabled = false;
39 return;
40 }
41
42 originalManualHeight = uiroot.manualHeight;
43
44 if (callWhere == CallWhere.Awake)
45 this.AdaptUI();
46 }
47
48 void Start()
49 {
50 if (callWhere == CallWhere.Start)
51 this.AdaptUI();
52 }
53
54 void Update()
55 {
56 if (callWhere == CallWhere.Update &&
57 (cachedScreenWidth != Screen.width ||
58 cachedScreenHeight != Screen.height))
59 {
60 cachedScreenWidth = Screen.width;
61 cachedScreenHeight = Screen.height;
62
63 AdaptUI();
64 }
65 }
66
67 void AdaptUI()
68 {
69 if (!enabled)
70 return;
71
72 float currentScale = (float)Screen.width / (float)Screen.height;
73 float manualScale = (float)manualWidth / (float)originalManualHeight;
74 if (currentScale < manualScale)
75 {
76 uiroot.manualHeight = (int)((float)manualWidth * (float)Screen.height / (float)Screen.width);
77 adaptType = AdaptType.BasedOnWidth;
78 }
79 else
80 {
81 uiroot.manualHeight = originalManualHeight;
82 adaptType = AdaptType.BasedOnHeight;
83 }
84 }
85 }

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeYAAAB6CAIAAADlImcUAAAgAElEQVR4nO3de1BbV54n8O6dnZramp3ampk/dntrsjVDpnZ3xnFhO9dwJSSEBBIgJPRASCAhQOL9Fk9jMG8sHgHMG79AwoAk9JY46biT7k46cXenk3Qnjt2djvOw23H8CI7t7kx1baq2a/ePs333WhIyL1vI/n0qfxz9dM65V7L05eZKuuc7JAAAgGjAZDK/E+l9AAAAsClbjux9+/bFbGDfvn1xcXGPaUcBAGDP+ru/+y8JmWX/GJv5r8yc/ey8g0n6F/n6wwIdW1jCk1QmZ5alClS7sqEtR3ZMTMxXX9+/9+D3937/zf3ff/PgD988+MM312/e+fDjz4+0d+3bt+/w4cO7smcAABAV/ts/HUwQlbUOmr/+w//6PxvIUDdtNJzBYBiNRqPRyGAwHrmt7UT2jdvrN7+6e3v96zt373/19f31ew/W7z24cu2Ldy593NFr3LdvH0EQAaMyMjIMBsMYzeifmczmb7/99sKFC/Hx8VvaEwAA2Av+/d98782Lt7RN07X9S/rWuSOj9lnrj1++8JuLV9evrf/h2//9pz/96U+8nMDIZjAYcrncaDSyWKzz58+fP3+exWIZjUa5XB4mu7cT2ddv3qFS+9Vff+F+/+rPP721fu/BlatfvHPp467jw/v27aMPiY+P1+v1zc3NZWVlOp1O/7CLFy9+++23c3Ont3FSBSGEENrqqF3ZxBPYNKWoqAghNDEx8WQ2F2xychIhVFRUFKkdAGAv++5f/f3PPv46u+ol+xuf9i280bfwRsfsK01j7tKueU3TuKH/7N27d7mqxoBRDAZjYGDgfJCBgYFNRXZeXl5FKHl5efQBMTExV2/cvn7zzmuXr/3L6KvfPer97lFv7PgP/9+x9tU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NTc3S6VSkUiUn59PzbNR/5WVlbq6OqFQ+Mgnc8/SaDQQ2REHkR1hBEGoVKrUaCaVSp1OZ0ZGBr0oEolcLpdUKhWLxWNjY263e3l5uaWlBSGEO2xUD6DVamdmZtxut8/nM5vN7e3tuC4UCvv7++12u91u7+/vFwqFuE6fJ2QbITQ3N+f1eq1Wa1tbm0gk2vyE9JtpaWmVlZXnzp3zer0nT56sq6sL37+kpGR5ednv99vt9kc8oXuVSqWCyI44iOwIIwhCoVDwwZOCEIr0LkQrhUIBkR1xENkRRhCETCZLBk8KQijSu2uYfioAAAERSURBVBCtZDIZRHbEQWRHGEEQYrGYC8CeJxaLIbIjDiI7wgiCEAqFHAD2PKFQCJEdcRDZEUYQhEAg4HA4iQDsYRwORyAQQGRHHER2hBEEwWQyuVwum81mAbAnsdlsLpfLZDIhsiMOIjvC4uLiDh48SJJkUlJSpD9eAiC0pKQkkiQPHDgAq9JEHER2hMXHxxMEceDAgf379+8DYE/av3//gQMHCIKAtR8jDiI78uLj4+Pi4ggA9rC4uDjI670AIhsAAKIGRDYAAEQNiGwAAIgaENkAABA1ILIBACBqQGQDAEDUgMgGAICoAZENAABRAyIbAACiBkQ2AABEDYhsAACIGhDZAAAQNSCyAQAgajCZzP8LQbIjXTHNt6EAAAAASUVORK5CYII=" alt="" />

Call Where 如果是 Update,那么在 Windows 下就可以拉窗口大小实时地看表现。

黑边怎么填充?

还没有实践。

如果底图要求等比缩放,可以让底图大一些,超过设计分辨率的大小,让他居中显示。这种办法也只能满足分辨率比例在一定范围内。如果超过这个范围,仍然会出现黑边。

可以在代码中判断,如果比例实在太夸张了,则干脆将底图放大!直到充满为止。超出去一部分是没有关系的。

如果说底图不要求等比缩放(比如 Sliced 九宫格的那种),那么就更好办了,Anchors 设置为与 UIRoot 对齐就可以了。

需要对齐的界面元素怎么处理?

指的是,左上角的人物头像区域,左下角的摇杆,右下角的各种按钮,右边的任务自动寻路按钮等这些需要 “散布” 在屏幕边缘的界面元素。

还需要实践,目前想法是,与 Anchors 设置为与  UIRoot  对齐。不知道会不会和缩放的那一套机制冲突。

上一篇:SQL Server获取自增列下一个Id


下一篇:java实现的简单词法分析器