Suppose you have a folder structure as follows:
Scenes --> Scene_001 containing ( scene_1, script_1.js, SceneObject_1 )
Scenes → Scene_002 containing ( scene_2, script_2.js, SceneObject_2 )
Standard Assets – > (all the normal things here)
I have attached the scripts to their respective scene objects; ie script_1 was drag connected to SceneObject_1, and so on.
What I would like to do is have script_1 execute a function in script_2. I tried to use
var x = GameObject.Find("SceneObject_2")
as well as
var x = GameObject.Find("/SceneObject_2")
to get a handle on the SceneObject_2. It simply can not find the object. So, how do we find game objects that are not in the same scene and not in the same folder?