Saving fails when using Assembly Definitions

Discussion and help for Easy Save 3
Post Reply
watanoge
Posts: 1
Joined: Wed Jul 22, 2020 2:50 pm

Saving fails when using Assembly Definitions

Post by watanoge »

Hello! I added assembly definitions to my proyect so I could use unit testing. I'm working on a WebGL proyect so the games can be played on web and mobile using ionic. On web, PC, editor and even APK file it all works great, but on the WebGL build for mobile (using gzip) the error:

NullReferenceException: Object reference not set to an instance of an object.
at ES3Writer.Merge(ES3Reader reader) [0x000000]
at ES3Writer.Merge() [0x000000]
at ES3Writer.Save(System.Boolean overwriteKeys) [0x000000]
at ES3Writer.Save() [0x000000]
at ES3.Save[T] (System.String key, T value, ES3Settings settings) [0x000000]
at ES3.Save[t] (System.String key, T value) [0x000000]

The line of code is:

Code: Select all

ES3.Save (currentUserId + globalInstance.name + "Levels", myLevels);
The variables used on the line are not null. Doing a Debug.Log of them displays the correct info we want to save.
And doing

Code: Select all

ES3.Load (currentUserId + globalInstance.name + "Progress", -6));
will always load the fallback option (not sure if its related or if it's because there is actually no info and it can't be saved anyways)

The thing that bothers me the most is that it works perfectly on PC, Web browser and APK file. But it didn't happen before, just after adding the Assembly Definitions and building for WebGL to use on an Ionic build.

The Unity version i'm using is: 2019.3.7f1
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving fails when using Assembly Definitions

Post by Joel »

Hi there, and thanks for getting in contact.

I have no reported issues on WebGL. Please could you do a debug build so I can see the precise error you're getting?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply