How can I instantiate my objects this way?

I want to instantite objects a certain way so the script knows what to do when I give it values of amounts to instantiate.

Lets say I want a gridlike instantiation but the script knows what the coordinates are.

When I would give the scripts values of this (0, 2, 3, 3, 2, 0)

It will instantiate that amount of objects on the vectors assigned to each values like 0 will spawn on the 0 of y axis and 2 on the 1 of y axis and 3 on 2 of the y axis but I want them to instantiate on top of eachother and not inside eachother, how can I do this all? what would your recommend to use?

You need to define a logical connection between you input and your desired result. Then do.

1 Answer

1

Take a look at this :

It shows you how to build a wall out of prefabs at run time, similar to what you are trying to do.