If you want to access any gameobject from your scene by C# script use this method .
First create an empty gameobject by right click on hierarchy area (on scene files).Then select empty gameobject.
write this code :-
GameObject xyz;
void Start()
{
xyz=GameObject.Find("YourGameObjectName");
//now you can do any stuff with ur gameobject
}
Comments