Member-only story
Declutter Your Hierarchy and Spark Joy in Your Projects
A big part of game development is the constant management and adjustment of the scene and all of its contents. This process, more often than not, must be handled during gameplay when we get a clear view of how our project and code performs. In Unity, this means searching for objects in the Hierarchy and adjusting values to either test out new ideas or correct errors. You will find that your biggest enemy in this endeavor is clutter.
A top-down shooter like the one I am working on will very quickly see the Hierarchy become unmanageable with laser and enemy objects. However, with a few simple changes to our code, we can minimize this mess and optimize our workflow.
OBJECTIVE:
Organize our project Hierarchy by compartmentalizing our instantiated GameObjects.
METHOD:
The idea we will employ for this task is quite simple — take every object we create at runtime and organize it inside separate “containers” in our Hierarchy.