public static void ClearAllMono() { foreach (var c in Cubes) { GameObject.Destroy(c); } Cubes.Clear(); foreach (var c in CubesWithScript) { GameObject.Destroy(c); } CubesWithScript.Clear(); }