Good day to all. I decided to write a tag on Unity3D, but got stuck and depressed. I wanted to implement random mixing of the pyatnaks, but I can’t understand where I’m wrong, so help out.
So I plan to have them look at the beginning: 
And this is how I want to mix them:
The result of all my attempts to implement is always like this:
It turns out that part of the chips always climbs on each other.
public class Primer : MonoBehaviour { private GameObject[] plastinka; private GameObject[] newObject; private Transform[] plastinkatransform; void Start () { newObject = GameObject.FindGameObjectsWithTag("Plastinka"); plastinka = GameObject.FindGameObjectsWithTag("Plastinka"); plastinkatransform = new Transform[16]; for (int i = 0; i < plastinka.Length; i++) { plastinkatransform[i] = plastinka[i].transform; } Shuffle(plastinkatransform); // var random = new System.Random(DateTime.Now.Millisecond); // plastinka = plastinka.OrderBy(x => random.Next()).ToArray(); for (int i = 0; i < plastinka.Length; i++) { newObject[i].transform.position = plastinkatransform[i].position;} void Shuffle(Transform[] deck) { for (int i = 0; i < deck.Length; i++) { Transform temp = deck[i]; int randomIndex = UnityEngine.Random.Range(0, deck.Length); deck[i] = deck[randomIndex]; deck[randomIndex] = temp; } } 
