public void LoadSaves() { for (int i = 0; i < SaveDictionary.GetAllSaves().Length; i++) { Instantiate(SavePrefab, transform.position, Quaternion.identity); SavePrefab.GetComponentInChildren <Text>().text = SaveDictionary.GetAllSaves()[i]; } }
private void Start() { string[] saves = SaveDictionary.GetAllSaves(); if (GameManager.Instance) { GameManager.Instance.currentSave = null; } if (saves == null) { return; } foreach (string item in saves) { AddSaveButton(item); } }