private static void SaveAll(SaveManagerComponent component) { //Go trough all the savers and save each of them. foreach (var s in component.Savables) { //Save the data from the object. JSONSolver.Write(s.Id.ToString(), s); } Debug.Log("Finished saving."); }
private static void LoadAll(SaveManagerComponent component) { //Go trough all the savers and load each of them. foreach (var s in component.Savables) { //Load the data. var objectData = JSONSolver.Read(s.Id.ToString(), s); //Load the object data. s.Load(objectData); } Debug.Log("Finished Loading"); }