- Home /
Saving data to local Device
HI, I'm trying to save my player data script using untiy Persistence tutorial, but i found out that i cant serialize GameObjects or ScriptableObjects...
is there a way to do that?
Thank you!
Answer by eses · Aug 21, 2018 at 09:18 PM
Hi @FakeBocha
The simple answer is you simply can't with built in tools. (edit: meaning, in simple manner. You could code any kind of serialization system yourself for your specific needs)
I think you understand the issue better, if you first read about and figure out what serialization actually means.
There was just today a good thread on the forums about the topic.
See lordofduct's answer: https://forum.unity.com/threads/terminology-what-does-serializable-mean-in-unity-terms.546241/
Also, read about different serialization methods - Json, Binary and XML serialization. These are pretty generic and not unity specific. Unity editor too has it's own serialization for editor/inspector stuff.
Also, if you are saving player data, you just need to save (serialize/deserialize) your player data only.
Your answer
Follow this Question
Related Questions
Duplicating Component with Some Scene References in Serialized Scriptable Object Class Reference 0 Answers
How to serialize parameters from JSON? 1 Answer
Saving data to export it later 0 Answers
Access serialized values from an outside script,Custom Editor Values access on Play 0 Answers
How can I load in data for a derived type class from a CSV? 0 Answers