看到一个unity制作2D游戏的教程,关于背景sprite的铺满,作个笔记:
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 background
object 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