NullReferenceException - ES3ReferenceMgr.CanBeSaved

Discussion and help for Easy Save 3
Post Reply
p3gamer
Posts: 2
Joined: Wed Nov 22, 2017 12:33 pm

NullReferenceException - ES3ReferenceMgr.CanBeSaved

Post by p3gamer »

I installed ES3 Beta and converted my ES2 code to ES3. When I hit Play, I get the following error:

NullReferenceException: Object reference not set to an instance of an object
ES3ReferenceMgr.CanBeSaved (UnityEngine.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgr.cs:126)
ES3ReferenceMgr.GenerateReferences () (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgr.cs:50)
ES3Postprocessor.PlaymodeStateChanged () (at Assets/Plugins/Easy Save 3/Editor/ES3Postprocessor.cs:35)
UnityEditor.EditorApplication.Internal_PlaymodeStateChanged () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:332)
UnityEditor.Toolbar:OnGUI()

Other than that, everything appears to be working fine for me.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: NullReferenceException - ES3ReferenceMgr.CanBeSaved

Post by Joel »

Hi there,

It looks like there's not an Easy Save 3 Manager in your scene. This can be added by going to Assets > Easy Save 3 > Generate New Reference IDs for Scene, or you can have it automatically added to every scene by selecting the Auto Add Manager to Scene checkbox in Window > Easy Save 3 > Settings.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
vandung
Posts: 2
Joined: Thu Feb 22, 2018 2:03 am

Re: NullReferenceException - ES3ReferenceMgr.CanBeSaved

Post by vandung »

Hi there.
I have the same problem when I run debug mode with my phone.

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
ES3ReferenceMgr.CanBeSaved (UnityEngine.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgr.cs:126)
ES3ReferenceMgr.GenerateReferences () (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgr.cs:50)
ES3ReferenceMgr.OnBeforeSerialize () (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgr.cs:17)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I tried to run with Joel's solution. But nothing changed.

Do you have any solution else?
Thanks
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: NullReferenceException - ES3ReferenceMgr.CanBeSaved

Post by Joel »

Hi there,

Please can you create a new project which exhibits the error and PM it to me so I can test it at my end?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
vandung
Posts: 2
Joined: Thu Feb 22, 2018 2:03 am

Re: NullReferenceException - ES3ReferenceMgr.CanBeSaved

Post by vandung »

Hi Joel!
I've fixed this problem.
When ES3 Reference Mgr action with my missing object. So it return exception for null value.
Other side, if you have some missing script attach for the object. This exception return exception too.

Thanks for your enthusiasm!!
Post Reply