Is there a way to check to see where things are being used in the Inspector? I have a script I thought I had added to an object and I can’t find it! I have quite a few objects I need to look through and I thought there must be a quicker way… Is there a way to select something in the “Project” section and have it appear highlighted in the “Hierarchy” section? Sorry if this is something I should have picked up in Unity 101!
Thanks
one quick way is to put in the script’s Start function a print(gameObject.name); That will tell you the name of what it’s attached to.
(Though this doesn’t help if it’s inactive…)
I made an editor script a while ago that helps with this. I just stuck it up on the wiki.
http://www.unifycommunity.com/wiki/index.php?title=SelectAllOfType
Cheers,
-Jon
You can also add a Debug.Log(“I’m here!!”, gameObject); inside the Start function. You can then click on the line printed in the console and Unity will draw an arrow to the object in the hierarchy.
Thanks for your help guys. Those are cool ideas. Jonathan, I downloaded your script and made a folder called “Editor” in my “Assets” folder to put the script in but I am afraid I can’t figure out how to use the script now that it’s in my project… Could you elaborate on that a bit?