SerializationException error when I try to Save and Load

Secondly, when I restart my game repeadetly there is no DontDestroyOnLoad object in the hierarchy so that I can’t use Save and Load methods after I have restarted.

See my response here: SerializationException - #4 by bixarrio

I have already done that “.value” process but nothing has changed. How about my second question, when I restart my game there is no DontDestroyOnLoad object spawning.

According to the error, you are still trying to serialize the LazyValue instead of the .value of LazyValue somewhere. This error may be what’s causing your second issue because processing may stop there and not get to the part where it’s setting up the DDoL

This might possibly be due to a setting in your Project Settings. Go to Edit|Project Settings|Player and scroll down. Make sure that Enter Play Mode Options is unchecked, as not reloading the Domain will cause the game to think that the PersistentObjects have been spawned when they haven’t when you press play a second time.

Oh, thanks a lot that solved my problem and in the following lectures I also solved my other issue.

1 Like

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

Privacy & Terms