public void LoadGameData() { var sdd = SaveDataFile.LoadSaveData(); Dictionary <string, List <Vector3Int> > tmp = new Dictionary <string, List <Vector3Int> >(); Dictionary <int, string> tmp2 = new Dictionary <int, string>(); int timesIndex = 0; int stepIndex = 0; int tmp2Counter = 0; foreach (int i in sdd.length) { List <Vector3Int> theGame = new List <Vector3Int>(); for (int k = 0; k < i; k++) { Vector3Int step = new Vector3Int(); step.x = sdd.xPos[stepIndex]; step.y = sdd.yPos[stepIndex]; step.z = sdd.zPos[stepIndex]; stepIndex++; theGame.Add(step); } tmp.Add(sdd.names[timesIndex], theGame); if (sdd.names[timesIndex] != "recent") { tmp2.Add(tmp2Counter, sdd.names[timesIndex]); tmp2Counter++; } timesIndex++; } savedGames = tmp; savedGamesNameByID = tmp2; }