In larger Unity projects, components sometimes “get lost” – you refactor something and there’s an audio source still attached somewhere in your hierarchy and you simply cannot remember where.
You’re not the first one. A while ago I created a simple editor script to combat this issue as a response to a similar frustrated post on the Unity forums. Earlier this week I stumbled on the script again, picked it up and dusted it off a bit and decided to give it another chance to shine in some spotlight.
Save the script as ComponentLister.cs.
Place it in /Assets/Editor in your project.
Launch the window from the Component menu – should be the last item titled “Component lister”.
Click “Refresh” to list all components in your scene and the GameObjects to which they are attached.
To investigate, click a GameObject name in the list and it will be set as the active selection in the hierarchy.