Example #1
0
 public static void LoadOrInitializeAnimalInventory()
 {
     if (File.Exists(Path.Combine(Application.persistentDataPath, "animalinventory.json")))
     {
         Debug.Log("loading animalinventory.json");
         AnimalInventory.LoadFromJSON(Path.Combine(Application.persistentDataPath, "animalinventory.json "));
     }
     else
     {
         Debug.Log("couldn't find animalinventory, loading from template.");
         AnimalInventory.InitializeFromDefault();
     }
 }
Example #2
0
 public static void LoadFromTemplate()
 {
     AnimalInventory.InitializeFromDefault();
 }