/*The GameManagerScript loads a saved game by instantiating marbles in the positions of the board corresponding to positions in the saved “state”-string where a character other than ‘0’ is present, then assigns its owner based on what the character actually is*/ for (int i = 0; i < state.Length; i++) { if (state[i] != '0') { int index = int.Parse(state[i].ToString()); MarbleScript thisMarble = Instantiate(marble, allTiles[i].transform.position + new Vector3(0f, 0.5f, 0f), Quaternion.identity).GetComponent(); thisMarble.owner = Players[index - 1]; thisMarble.owner.myMarbles.Add(thisMarble); thisMarble.ChangeTile(allTiles[i], false); } }