Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

gameobject in unity c#

//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#
 
PREVIOUS NEXT
Tagged: #gameobject #unity
ADD COMMENT
Topic
Name
1+7 =