- Home /
UnitySerializer not saving properly/any longer
Hi there,
I once importet UnitySerializer into my project, just to try it out. Afterwards I removed it. Weeks later, I re-imported it, deleted all saved games. Now when I try to save with it (with test classes like PauseMenu.js or TestSerialization.cs), it will display my saved game. But when I restart the game, the saved games will be gone.
Do you have any suggestion what to do to fix this?
edit it is now saving again. But when I try to load the saved game, my whole terrain and everything but GUI stuff will disappear. And the following Exception will be thrown:
NullReferenceException: Object reference not set to an instance of an object
LevelLoader+<Load>c__Iterator8.<>m__C3 (UnityEngine.Component c) (at Assets/Plugins/whydoidoit.com/Serialization/LevelLoader.cs:250)
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[UnityEngine.Component].MoveNext ()
System.Collections.Generic.List`1[UnityEngine.Component].AddEnumerable (IEnumerable`1 enumerable) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[UnityEngine.Component]..ctor (IEnumerable`1 collection) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/List.cs:65)
System.Linq.Enumerable.ToList[Component] (IEnumerable`1 source)
LevelLoader+<Load>c__Iterator8.MoveNext () (at Assets/Plugins/whydoidoit.com/Serialization/LevelLoader.cs:250)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
<PerformLoad>c__IteratorB:MoveNext() (at Assets/Plugins/whydoidoit.com/Serialization/LevelSerializer.cs:1155)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LevelSerializer:LoadNow(Object, Boolean, Boolean, Action`1) (at Assets/Plugins/whydoidoit.com/Serialization/LevelSerializer.cs:1150)
LevelSerializer:LoadNow(Object) (at Assets/Plugins/whydoidoit.com/Serialization/LevelSerializer.cs:1106)
PauseMenu:OnGUI() (at Assets/UnitySerializer/Scripts/PauseMenu.js:58)
and yes, the gameobjects I want to have displayed are all marked for saving
Your answer
Follow this Question
Related Questions
container class save based on Cherno's example 1 Answer
Delete a serialized binary save file 2 Answers
Save and load a class 0 Answers
Serialize GameObject 1 Answer
How can I serialize the Particles of a Particle Emitter 1 Answer