Settings

We covered the Pixels To Units measurements for our sprites back in Chapter 3, “Creating 2D Sprites.” This ensures that the size of all of our game elements is comparable to that of our player, so that all of the GameObjects will be in scale with one another. Once we have our worlds built, enemies placed, and props added, this will make sense, but first we have to build these things.

Another benefit of setting the Pixels to Units size is that it will uniformly align all of the tile sprites, allowing us to easily snap the ends of one tile to the next.

Grid

The grid in our Scene View will help us “snap” pieces of our levels together easily. When we set the Pixels To Units size for the tile sprites (70), it made them equal to their actual ...

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.