RPG Core Combat lection 080 problem

I put the SavingWrapper script and when I press S it appear this message:
SerializationException: The object with ID 97 was referenced in a fixup but does not exist.
System.Runtime.Serialization.ObjectManager.GetCompletionInfo (System.Runtime.Serialization.FixupHolder fixup, System.Runtime.Serialization.ObjectHolder& holder, System.Object& member, System.Boolean bThrowIfMissing) (at :0)
System.Runtime.Serialization.ObjectManager.CompleteObject (System.Runtime.Serialization.ObjectHolder holder, System.Boolean bObjectFullyComplete) (at :0)
System.Runtime.Serialization.ObjectManager.DoFixups () (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)
RPG.Saving.SavingSystem.LoadFile (System.String saveFile) (at Assets/Scripts/Saving/SavingSystem.cs:72)
RPG.Saving.SavingSystem.Save (System.String saveFile) (at Assets/Scripts/Saving/SavingSystem.cs:42)
RPG.SceneManagement.SavingWrapper.Save () (at Assets/Scripts/SceneManagement/SavingWrapper.cs:27)
RPG.SceneManagement.SavingWrapper.Update () (at

Kindly post your version of SavingSystem… It looks from the message like there was no prior save file, in which case LoadFile() should have returned a blank dictionary. If I had to guess, line 65 if(!File.Exists(path)) is missing the ! before FileExists

If this is not the case, try deleting the Save file. It may be corrupt.

1 Like

Thanks, the save file was corrupted

One caveat about this particular save system is it is not “version independent”. Changes in the things being saved (like we often do in development) can cause a version mismatch, so corrupt may not even be the correct term, it’s just that the information serialized in the save file doesn’t make sense to the new deserialization we’re performing after we’ve made a change in the data expected.
I hope that made sense.

1 Like

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

Privacy & Terms