Prefab saving issue -

Discussion and help for Easy Save 3
Post Reply
SamWal21
Posts: 2
Joined: Tue Feb 20, 2024 12:43 pm

Prefab saving issue -

Post by SamWal21 »

Hi There,
I had prefab saving working...but now it is throwing an error and I am not sure why or what I have changed.... I have tried refreshing the reference manager but that hasn't solved it.

Here is the error message: NullReferenceException: Object Reference not set to an instance of an object.

This is coming from ES2ReferenceMgrBase.cs:244

The code calling this is:
prefabSaveList = ES3.Load<List<GameObject>>("prefabInstances", $"{currentLoadSlot}/{filename}");

The save part of the above code is:
ES3.Save("prefabInstances", prefabSaveList, $"{CurrentSaveSlot}/{filename}");

Any ideas - I am hoping it is me just being dumb and an easy fix!

Thanks,

Sam
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Prefab saving issue -

Post by Joel »

Hi Sam,

Please could you post the full error with stack trace.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
SamWal21
Posts: 2
Joined: Tue Feb 20, 2024 12:43 pm

Re: Prefab saving issue -

Post by SamWal21 »

Hi Joel,

I have attached a snip of the stack trace, hope that is ok.

I thought I had found the issue which is that at runtime the ES3 reference Manager is adding in an additional ES3Prefab reference which isn't referencing anything - see the second attachment called "issue.PNG". However the problem has weirdly fixed itself (it is now loading in the prefabs without errors) even though it is still adding it that null reference ES3prefab...

I am a bit confused but for now at least it seems to be working...

If you realise the issue please let me know, otherwise I will just continue with it as it is seeing as it is working - I don't really like not know what the issue was/is though.

Kind Regards,

Sam
Attachments
issue.PNG
issue.PNG (22.85 KiB) Viewed 198 times
stacktrace.PNG
stacktrace.PNG (112 KiB) Viewed 198 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Prefab saving issue -

Post by Joel »

Are you using the latest version? The line numbers don't appear to line up with the latest version, and there was a bug fix for something similar in a previous version.

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