Unity Editor Find Component Shortcut?

hi,

I love how in the editor, you can click on a game object’s script component to see where the script is in your project. However, I’m trying to find a way to lookup or find where a script is attached to game objects in the Hierarchy. Is there any way to find out where scripts are attached in the current scene? big projects are a headache to look through if you have to manually peek into all the game objects for a single component.

Please tell me there is a faster way. . . >_<;;

Thanks~

There might be an existing editor script that will do that for you (if there is, someone will probably post a link).

If not, it would be easy to write one.

Type the name of the component in the search box.

–Eric

1 Like

In the project view, that only tells me where the source file is. In the hierarchy view that only returns objects. Is there another way I don’t know about?

1 Like

Oops, I was thinking 2.x. (2.x doesn’t have that feature, does it?)

Aren’t the objects what you’re looking for? (That is, what you’re interested in finding is all game objects to which the specified script is attached, right?)

Thanks Jesse and Eric,

Turns out I wasn’t entering the complete name of the script. As I type, the list changes to reflect each inputed character and I assumed that it was futile to enter any more letters if it doesn’t even find half of what I type. At the very end after entering the last letter of the script name… BAM, list shown.

Unity is great!

2 Likes

I’m know I’m resurrecting an old thread, but this is still an issue in Unity 4.2, and IMO it’s really a bug. I don’t blame happyhopper for not working it out. However, I’m interested in whether others agree it’s an issue.

  • The Hierarchy view updates search listings as you type
  • Objects are found by name based on partial or exact matches
  • Components are found by name based only on exact matches

#1 and #2 are great. #3 just doesn’t work well with the others - it makes it seem like components can’t be searched for in the Heirarchy.

Maybe there’s an internal reason for this - reducing clutter, search performance? But it seems more likely to just be an oversight.

2 Likes

For anyone who still interests:

  • Drag multi scenes to Hierarchy (all scene if needed)
  • Go to script location in Project view
  • Right click the script and chose Find References in Scene

Voila! All game object with that script attached will be remained in Hierarchy view

1 Like