Using the Snap Settings to Position GameObjects

We can also use the Snap Settings tool described previously in this chapter. This will snap the GameObject with precise values. From the Project Browser, pull in another Prefab asset to make our current ground a little more solid:

1. Find the grassCenter Prefab and drag it into the Scene View, trying to roughly place it below the grassMid Prefab.

2. Open the Snap Settings window by going to Edit > Snap Settings.

3. With the values for Move X, Move Y, and Move Z all set to 1, click the Snap All Axes button.

4. The grassCenter Prefab should now be snapped below the grassMid Prefab and sitting in world space at 0, –1, 0 in X, Y, and Z respectively.

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.