How to find component (for example: script) references/usages in prefabs?

I want to find out which prefabs reference or use a specific object. I have just purchased a new package and I want to understand some part of its code in order to make some modifications. But the code sends a message to a MonoBehavior that I cannot find any references to.

Of course I need to know whether there is some automated way to do that instead of inspecting all the prefabs manually :).

First, are you sure the script is available in the package you purchased? It might only contain the binary files, if they don’t want people to see/copy their code. Then you can’t see the scripts whatever you do. You’ll have to contact the package’s creator to ask them for APIs or references of their scripts.

As for prefabs, you should see the scripts attached to them, or any other components, in the editor, just like any other object.


Yes, there is a way to find out where a particlular script is being used in prefabs.

Check it out here: Unity Asset Store - The Best Assets for Game Making

Here is a simple script for you to use.

public BoxCollider col; // You Can Replace BoxColider With Any Component You Want

void Start () {
col = gameObject.GetComponent  <BoxCollider> ();

void DoStuff () {
coll.size = new Vector3 (5, 5, 5); // Just An Example.