- Home /
I want to swap 5 blocks randomly on same position.
I want to swap this 5 blocks randomly in same position (Assume that blocks has different color)
basically i want to swap each block before spawning it look at the picture assume that block has diffrent color @$$anonymous$$axGuernseyIII
Answer by Bale_txy · Jan 27, 2018 at 01:16 PM
you can create as List of GameObject, adding these 5 objects into your list and spawn randomly using Mathf.random
Regards, Bale
can u share any video or something like that? @Bale_txy
You may wish to check this tree documentation: 1. List 2. Instantiate 3.Random number
Answer by sirjoan620 · Jan 27, 2018 at 08:14 AM
You may put theese objects into an array. Then order them randomly.
Edit: Then of course Instantiate them correctly.
how do i do that i know how to instantiate but i dont know how to random my block i mean swap @sirjoan620
Your answer
Follow this Question
Related Questions
i want to swap my blocks 1 Answer
Stacked Bullets on Instantiation 0 Answers
2D repeating obstacles with a random Y value 0 Answers
i want to spawn randomly 1 Answer