There is my code to instantiated 3 object in a row
public GameObject clone;
void Start()
{
for (int i = 0; i < 3; i++)
{
Instantiate(clone, new Vector3(i , 0,0), Quaternion.identity);
}
}
And I want to write some code to change their positions individually.
void Update()
{
clone1.transform.position = new Vector3(...);
clone2.transform.position = new Vector3(...);
clone3.transform.position = new Vector3(...);
}
How can I naming each instantiated clone in “for” loop ?