- Home /
Building sim, saving levels and states
Hi,
I am really just asking for a cursory overview at this stage. Unity answers has a variety of topics about saving, but they are often quite specific and my use case isn't a simple player prefs one.
I am building a sim game, where you build a city, which has inhabitants. In short I need a nice clean way to integrate a save system which can read most objects in the game and save certain data about them. This includes links to other objects, such as a homes dweller etc.
I've done this sort of thing in other engines before but it's a Unity first for me, so if you could kindly help me with some general approaches and what their implications for the design process are(I'm implementing this before I really get stuck in) I would be grateful.
An overview of the saving and loading process would be extra helpful :)
Thanks for your time
Serialization is a super complicated subject, especially when saving related assets. It needs designing in from the start. There are a couple of asset store assets that help - including my free Unity Serializer, but it will still take work.
@whydoidoit I just found your plugin a few $$anonymous$$utes ago and watched your video - I am stunned! Having done a semi complex save system once for a game I was loathing this task and I'm just dumbfounded about how well this system looks like it integrates into Unity.
I'll have a look at it properly now, and post some further experience later. :)
Thanks again.
Believe me it isn't particularly easy on some kinds of game, especially if you try later in the process :) It works easily for about 80% of people who use it, it can't work on around 5% of cases without significant effort and the rest takes some work!
Fortunately having done this once before I was wary enough to not let myself have much fun with the rest of the project until I had addressed this, from a cursory read of your docs so far, it looks like it should work fine in my project.
Off topic of my current project: It this solution overkill for saving basic grid maps for a game with a runtime level editor?
I use the core "UnitySerializer" part to save individual classes etc (as a replacement for BinaryFormatter) it's fine for level editing, people do that frequently. As soon as something needs to reference things in the scene you need to use SaveObjectTree or a proper level serialization. The biggest problem come from getting the right scripts on things that are in the scene (that you might have a reference to).
Your answer
Follow this Question
Related Questions
Newbie questions! (Variables and Saving) 2 Answers
Saving Levels 2 Answers
How do you save a player's prefered resolution in Unity 2017.1.1f? 0 Answers
Saving and loading to/from Android 1 Answer