Unity 2D 背景平铺笔记

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

background.png技术文章技术文章

默认camera的size:技术文章

技术文章

技术文章

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:

技术文章

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.

文章来自:http://www.cnblogs.com/zhaoqingqing/p/3556249.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3