Organizing Our Prefabs

Take a look at the _prefabs contents, and prepare to scream (or laugh—some people handle pressure better than we do)! This folder has no organization to speak of and it shows. While the names of all the assets indicate fairly clearly what they are, we can organize this folder a lot better.

All of the assets were pulled from the _sprites folder, which luckily does contain folders to break up the individual sprites. Let’s set up the _prefabs folder to match this:

1. In the Project Browser, right-click on the _prefabs folder and select Create > Folder.

2. Rename this new folder to match the first one under _sprites. Call it “enemies.”

Now that we have a folder for any of the enemy Prefabs, all of them can be moved there. This ...

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.