How the heck do I save this info for my characters? [Serialization Usage Question]
Hey all, I couldn't quite find what I was looking for, so I decided to make a post.
EDIT: I have since gotten /some/ new information and will re-write my post. I am still struggling and am getting very frustrated with myself. I'd really, REALLY appreciate some help.
====
To put it as briefly as possible, I am trying to save my character's essential information, and not only have I heard PlayerPrefs is ill-advised, but it also won't work right for some of the information I have (for instance, I can't PlayerPrefs my Profession and its accompanying stats and inherited class info), so I've pretty much assumed the best, if not only way, to accomplish this is through Serialization.
I have quite a few scripts written, and here's the gist for them.
Slight description of them: I am simply trying to make a character script for a guard that will take both the Job: Mercenary, as well as the Type: Standard, and then, I want to be able to save that. In theory, the GameControl.cs script would accomplish that, but I'm having troubles (obviously), and I have a bunch of things commented out because I am fairly clueless, lol.
So, that said, I did do the Persistence and Saving tutorial from Unity, but I'm not only using/calling different scripts, I'm not handling simple floats, so I've had a hard time modifying that. Ultimately, I just want to know two things: Is my code that I am trying to save sensible? If it is, then how on earth would I use Serialization to save the info?
Thanks in advance, I appreciate any help I get.
I hate to bump, but I'm unable to do any of this without some help :/
Answer by DCDaniel · Jul 15, 2016 at 07:59 AM
Hmm, ok, since I suspect I might jsut be typing this out in a very obtuse way, I made pictures.
My gist doesn't TOTALLY apply now, because I changed the example in my pic to something easily understood -- Races and Jobs.
I think that explains my thought process very well on how I've tried to go about this.
**Slot is referring to the slot on the menu you'd see a character in. For instance, if you have 3 characters in your party, and you enter battle or open a menu, you'd see all 3, in some order. I'm referring to those as slots in the example pics, and I haven't coded anything for that yet (I included it because it demonstrates how I'm trying to pipeline the information.
Perhaps this is a very very bad way. I'd love to know if that's the case.
Or maybe that was clearer than anything I've said and now you lovely people can provide help :)