On the Unity Editor Search Window, how to search for components that are in child game objects of prefabs?

For example, I want to find all “AudioSource” components in my project.

If I use the Search to find AudioSource, it will list the prefabs that have an AudioSource on the root object of the prefab.

But I also want to find AudioSource on child objects of prefabs.

Hi @VBenincasa,

By default, we only index the top level of prefabs and scenes. If you want to index the total content of a prefab, you need to add “Sub Objects” to your indexing options.

Here is a picture showing:

  • My index manager with Sub Objects
  • A prefab opened in the Scene View using PRefab isolation where a child (Capsule) is selected and has an AudioSource (shown in Inspector)
  • The Search Window has the query:
  • p: t:audiosource and yields the Cube prefab

I hope this helps.

Seb

1 Like