首页 > 其他 > 详细

NGUI如何使2D图片按像素1:1显示在屏幕上

时间:2014-03-12 06:21:01      阅读:593      评论:0      收藏:0      [点我收藏+]

NGUI版本为3.5.1。

将camera 设置为正交模式,size值设为1.

 

UIRoot(2D)有3种缩放样式:

1.PixelPerfect。UI严格按照指定的像素大小显示,不会随着屏幕的分辨率变化。这表示,一个按钮在低分辨率下看起来会比较大,而在高分辨率下看起来比较小。

2.FixedSize 。UI按照在Game tab内的显示比例,自动调整大小。

3.FixedSizeOnMobile 。根据发布平台(移动/桌面)在以上两种样式中自动选择。

还有3个公共属性:

int  manualHeight = 720
  Height of the screen when the scaling style is set to FixedSize. More...
 
int  minimumHeight = 320
  If the screen height goes below this value, it will be as if the scaling style is set to FixedSize with manualHeight of this value. More...
 
int  maximumHeight = 1536
  If the screen height goes above this value, it will be as if the scaling style is set to FixedSize with manualHeight of this value. More...

 

官方的文档地址在这里

http://www.tasharen.com/forum/index.php?topic=6710.0

http://tasharen.com/ngui/docs/class_u_i_root.html

NGUI如何使2D图片按像素1:1显示在屏幕上,布布扣,bubuko.com

NGUI如何使2D图片按像素1:1显示在屏幕上

原文:http://www.cnblogs.com/xushiu3d/p/3594118.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!