Question by
arjunh · Aug 10, 2016 at 04:57 AM ·
script.scriptingbasics
how can we find, in which all places a same script have been used in the project
i am new to unity, i got a sample project of a game. it has a lot of script used in it.i dont know where to start and where is the beginning..can you suggest a way to find in which all places a same script have been used in the project (ie which all components have added the same script)
Comment
Answer by itsharshdeep · Aug 10, 2016 at 05:15 AM
Hi,
You can write the whole script name in Hierarchy tab
like your script name is GameController which is attached on the MainCamera & script GameObject. So when you will write the name of the script i.e. "GameController" in the Hierarchy Search bar you will be listed out GameController, MainCamera automatically
Or you can also do like
Write the following line in Start() or Awake()
Debug.Log ("Script is attached on the " + gameObject.name);