- Home /
How to spawn my gameobjects and have it disappear after i click it
I have a simple pattern game that works just like simon says; however, instead of my colored boxes staying in a fixed position, how do i get it to spawn at random positions in its pattern, and not disappear after i click them?
Comment
Answer by Smurfj3 · Dec 13, 2019 at 11:49 AM
Multiple ways to do this, if you have all possible positions the box may spawn, you simply put them all in an array and pick a random 1 of those positions like possibleSpawnPositions[Random.Range(0, amountOfSpawnPositions); and move the box to the desired location.