Answers for "public gameobject unity"

C#
4

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#
Posted by: Guest on September-01-2020
0

public gameobject

public GameObject myObject;
Posted by: Guest on August-22-2021
0

public gameobject unity

INSTEAD OF WRITING PUBLIC LIKE THIS:-
public GameObject object;
YOU CAN WRITE SERIALIZEFIELD LIKE THIS:-
[SerializeField] GameObject object;
Posted by: Guest on September-02-2021

C# Answers by Framework

Browse Popular Code Answers by Language