using System.Collections.Generic; using UnityEngine; using Random = System.Random; namespace Framework { public class Algorithm { public static void ShuffleInPlace(IList list) { var random = new Random(Time.frameCount); for (int i = 0; i < list.Count - 1; i++) { int j = random.Next(i, list.Count); if (i != j) { T temp = list[j]; list[j] = list[i]; list[i] = temp; } } } } }