Save system broke out of my depth of knowledge on how to fix

Hey I keep getting this error when trying to save and i really have no clue how to fix it and its stressing me out, any help appreciated!

SerializationException: End of Stream encountered before parsing was completed.
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run () (at :0)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at :0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at :0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at :0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck) (at :0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) (at :0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) (at :0)
SavingSystem.LoadFile (System.String saveFile) (at Assets/Scripts/Saving/SavingSystem.cs:51)
SavingSystem+d__0.MoveNext () (at Assets/Scripts/Saving/SavingSystem.cs:14)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <04258d1cdc1044248c2a17a6a31a3cf7>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
SavingWrapper:Awake() (at Assets/Scripts/SceneManagement/SavingWrapper.cs:12)
UnityEngine.Object:Instantiate(GameObject)
PersistentObjectSpawner:SpawnPersistentObjects() (at Assets/Scripts/Core/PersistentObjectSpawner.cs:22)
PersistentObjectSpawner:Awake() (at Assets/Scripts/Core/PersistentObjectSpawner.cs:15)

It looks like at some point, you had an error while you were saving (this often happens the first time students deal with LazyValues, for example). This corrupted the save file.
Try deleting the Save file.

Hey thanks for the reply on discord it fixed it, i was missing a .value in my capture state in the health script

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms