Spawn objects at given places randomly

i want to make a game to select one of the different picture from 3 row and 3 column style i want to place all objects without overlapping.

Use the grid layout component

there are a few ways,
You can do this with a UI Grids. Then randomize the order when you add them in.
https://docs.unity3d.com/Manual/script-GridLayoutGroup.html

You can create a Vector3 or Vector2 array/List of all the positions you want the images to spawn at. When you spawn each image you can randomly pick a location from the list.

ItzChris92, You posted just befor me

1 Like