Hierarchy

One last place you might want to do some organizing is with the Hierarchy of your Scene. This can become messy and convoluted, even more so than the Project Browser. This is because when you drag things into your Scene, there is no real structure for them. If you have an asset called “myAsset,” and then drag in multiple copies, they will all keep the same name. Having 20 of these with the same name makes it hard to tell which one is which!

A good way to keep this structured is by placing things in their own containers. Unity does not really provide a clean way to do this, but we can use empty GameObjects to act as containers. Let’s walk through the steps for our level design.

Note

We briefly touched on this concept in Chapter 4, “ ...

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.