首页 > 其他 > 详细

Unity 2D 背景平铺笔记

时间:2014-02-20 02:43:09      阅读:3025      评论:0      收藏:0      [点我收藏+]

看到一个unity制作2D游戏的教程,关于背景sprite的铺满,作个笔记:

background.pngbubuko.com,布布扣bubuko.com,布布扣

默认camera的size:bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

For example, consider a Sprite imported from a 500 pixels wide image. The following table shows the different widths your GameObject would have when rendering that Sprite at different scales along the x-axis, using different values for Pixels to Units:

bubuko.com,布布扣

background.png is 640 pixels tall, and the background Sprite has a Pixel to Unit ratio of 100, so the backgroundobject in the Hierarchy will be 6.4 units tall. However, the orthographic camera’s Size property measures half the height of the screen, so it should be half the height of the background, in units, or 3.2.

Unity 2D 背景平铺笔记

原文:http://www.cnblogs.com/zhaoqingqing/p/3556249.html

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