In this lesson, you will learn how to audit your project to ensure only the necessary files are included in your final game build, keeping your file size lean and your project professional.
As you have built your game, you likely imported many textures, 3D models, and sound files. Some of these were likely experiments that didn't make it into your final scenes. Including these unused assets in your final build increases the download size for players and can cause unnecessary clutter.
Auditing for Unused Assets
Before you prepare your build, take a moment to review your Project window. If you have folders labeled "Test," "Old_Drafts," or assets that aren't referenced by any of your Prefabs or Scenes, it is time to remove them. Unity's Asset Database tracks dependencies, but it doesn't automatically delete files you stopped using. If a file isn't linked to a GameObject in a scene or referenced inside a Prefab, it is usually safe to remove.
Verifying Build Settings
Once you have cleaned up your folders, you must verify which scenes are actually being included in the build. You can do this by navigating to File > Build Settings.
In the Scenes In Build window, only the scenes you want the player to access should be checked. If you have an "OldTestScene.unity" sitting in your folder, ensure it is either deleted or unchecked so it doesn't get bundled into your final game executable.
Pro-Tip: Dependencies
Remember that Unity is smart: if you have a Material that uses a Texture, and you have a Prefab that uses that Material, Unity will automatically include all three in your build because they are linked. This is why keeping a clean folder structure is vital—if you delete a file that another asset relies on, Unity will show a "missing reference" error in your console. Always test your project by clicking Play one last time before building to ensure your references remain intact after your audit.
Key Takeaway: A professional build is a clean build; always audit your project folder to remove unused assets and verify your Build Settings to ensure only the intended scenes are included in your final executable.