using c#
public Transform flag;
if(!triggered){
//Debug.Log(string_input.Length);
for (int i = 0; i < string_input.Length; i++)
{Instantiate(cube,flag.transform.position,flag.transform.rotation);
}
triggered = true;
}
currently those cloned gameobjects are on the same x and y position,
i would like to make it so that when the gameobjects is spawn for eg 5 objects, i named it 1,2,3,4,5.
it will spawn as 1 then 2 then 3 then 4 then 5.
with gameobject1 is on lets say position.x is 0 and position.y is 0,
and gameobject2 is on position.x 5 and position.y is 5 and so on to have a up down up down looking feel.
anyone knows how to go about doing it?
any help would be greatly appreciated. thanks.