コード例 #1
0
 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];
     }
 }
コード例 #2
0
    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);
        }
    }