- Home /
Question by
AlanMattano · Aug 03, 2020 at 07:54 PM ·
script.referenceeditor extensionworkflowfind-gameobject
How to find one script location to the gameobject is attached to in the Hierarchy?
As shown in the screenshot "Find References in Scene" show a lot of potential game objects in my big Scene where my script can be attached to. So is not useful in my case.
I wish to get the single object where the script is attache to. In Unity is missing this shortcut?
Is there a way via script to filer the result?
Or what asset in the Asset Store can find the game object
Thanks
findscriptinherarchy-1.jpg
(315.3 kB)
Comment
Best Answer
Answer by xxmariofer · Aug 03, 2020 at 08:10 PM
simply in the Hirerchy search box type the full script case sensitive and in code you can use https://docs.unity3d.com/ScriptReference/Object.FindObjectOfType.html