Actually I was creating a Billiard game, I was calculating power from “gui texture” and then sending it to a script which was attached to cueball but both were in scene. Now I am creating it multiplayer so I have made cueball a prefab and removed it from scene. How can I send “power” value attached to an object in scene to a script attached to prefab which is in project?
I was using code earlier as shown below:
other = GameObject.Find("CueBall"); other.GetComponent("script").power = thePower*50;
Now “thePower” is a variable of an object which is in scene but the “power” is a variable in project as it is attached to prefab(CueBall).