I want to swap 5 blocks randomly on same position.

108391-capture.png

I want to swap this 5 blocks randomly in same position
(Assume that blocks has different color)

You may put theese objects into an array. Then order them randomly.

Edit: Then of course Instantiate them correctly.

you can create as List of GameObject, adding these 5 objects into your list and spawn randomly using Mathf.random

Regards,
Bale