Check out example codes for "gameobject in unity c#". It will help you in understanding the concepts better.

Code Example 1

//define "myObject"
//(asign in in inspector)
public GameObject myObject;
//runs when you hit the play button
void Start()
{
  //change the name to "myObjectsNewName"
  myObject.name = "myObjectsNewName";
}
//Note for Unity and C#

Learn ReactJs, React Native from akashmittal.com