You've successfully subscribed to Hacking with Unity - Learn how to create your own games
Great! Next, complete checkout for full access to Hacking with Unity - Learn how to create your own games
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

How to find out a script is used by which game objects

Ben Liu
Ben Liu

Our game objects might have lots of scripts, game objects and scenes, we probably can't remember which script is being added to which game object. Unity does provide a built-in function that can help us easily identify those game objects or scenes.

Select target script, right click Find Reference in Scene:

The output will be:

As you can see, there is only one GameObject in the hierarchy owns the script SoundManager.cs.

Ben Liu

Please feel free to contact me if you have any question. <br> https://t.me/NeedoneApp