private void CreateNewLevelAndStoreIt() { var soverview = new SOverview().Initialize(); StoreLevel(soverview); Load(); }
private void Load() { if (!File.Exists(FilePath)) { SelectedGame = new SOverview().Initialize(); StoreLevel(SelectedGame); } else { SelectedGame = JsonUtility.FromJson <SOverview>(File.ReadAllText(FilePath)); } }
private static void StoreLevel(SOverview overview) { var json = JsonUtility.ToJson(overview); File.WriteAllText(FilePath, json); }