Unity quick tip — organizing your hierarchy
Have you ever had this happen?
As your scene starts filling up it begins to look messy, and it makes it hard to find objects in the scene.
There is a quick and easy solution that involves “parenting”. Look at the following code snippet.
What we do is create an empty object to act as our container and in the script, we create a reference to it. Now when we spawn our enemies, we can assign their parent object when we instantiate them, then each time an enemy spawns, it becomes a child of the enemy container. Now we can collapse the container and clean up our hierarchy.
That's all for now.