After watching this =>
https://unity3d.com/learn/tutorials/topics/scripting/persistence-saving-and-loading-data
I'm left with one ominous question:
I understand that it's good practice to have a Game Controller object on which you can declare your save and load functions, and serialize the data, but i'd rather you could feed the Game Controller with each and every npc/object transform and other necessary variables as needed, through a script attachable to the various GameObjects whose properties need saving. Keeping it the way it's presented in the tutorial, it seems I'd have to know the name of each and every player in my game and declare every other variable related to him beforehand in one single GameController PlayerData class, which seems just unreasonable, when I could much more easily place a save object on the NPC and have them write tailored variables to the savefile by feeding them to the Game Controller Player Data class as necessity demands.
↧