_ES3Ref refers to wrong object
Posted: Sun Jan 16, 2022 4:21 pm
I've run into a problem several times where it seems like Easy Save is referencing the wrong object in saved games, so when it tries to load the game I get an error like
Here is a screenshot showing how the types are incorrect. The Ease Save reference ID should be referring to a CaptureTheFlag.Agents.Anatomy.BodyType object (which is a ScriptableObject), but instead Easy Save seems to be referencing a Sprite object.
https://imgur.com/YQNhzn8
This problem has happened several times at different points in my development, and I haven't been able to figure out what is happening within Unity that is causing this problem. When it happened this most recent time, I had disabled some SpriteRenderers in my game prior to saving, but I'm not sure if that was just a coincidence of if that has something to do with this problem. My guess is that Easy Save is changing what objects its _ES3Ref values (from the save file) refer to, but I don't know why it would be doing that.
Code: Select all
Unable to load saved game: System.ArgumentException:
Object of type 'UnityEngine.Sprite' cannot be converted to type 'CaptureTheFlag.Agents.Anatomy.BodyType'
https://imgur.com/YQNhzn8
This problem has happened several times at different points in my development, and I haven't been able to figure out what is happening within Unity that is causing this problem. When it happened this most recent time, I had disabled some SpriteRenderers in my game prior to saving, but I'm not sure if that was just a coincidence of if that has something to do with this problem. My guess is that Easy Save is changing what objects its _ES3Ref values (from the save file) refer to, but I don't know why it would be doing that.