Getting editor errors when using Auto Save

Discussion and help for Easy Save 3
Post Reply
archer3cl
Posts: 1
Joined: Tue Jun 13, 2023 2:59 pm

Getting editor errors when using Auto Save

Post by archer3cl »

A fresh installation of this component, after following the tutorial for adding auto-save these errors started to show up:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.DoGetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <e35f2ca690d241b7981de4b44e6c2240>:0)
It seems that the following lines on AutoSaveWindow.cs have the wrong string when searching for a style

Code: Select all

searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSeachTextField"));
if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
Switching "ToolbarSeachCancelButton" to "ToolbarSearchCancelButton" fixes the issue.

Creating this forum post to ask the creators to update the package and fix this by default.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Getting editor errors when using Auto Save

Post by Joel »

Hi there, and thanks for getting in contact.

We've had no reports of this and I don't appear to be able to replicate it at my end. Could you let me know the precise version of Unity you're using?

Note that the typo is actually at Unity's end as they misspelled 'Search'. See https://gist.github.com/goto01/96c57f68 ... 12db6333c6

If it's only working with the typo corrected then it indicates that they've corrected the typo in a specific version.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
pierrenay
Posts: 17
Joined: Sun Sep 01, 2019 8:25 am

Re: Getting editor errors when using Auto Save

Post by pierrenay »

Hi there,

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.TextEditor.UpdateScrollOffset () (at <cbf2a10624ce43bd854be663c98dfa0e>:0)
.... + 100 errors.....
points to:
ES3Editor.AutoSaveWindow.OnGUI () (at Assets/Plugins/Easy Save 3/Editor/AutoSaveWindow.cs:103)
ES3Editor.ES3Window.OnGUI () (at Assets/Plugins/Easy Save 3/Editor/ES3Window.cs:180)
Could not extract GUID in text file Assets/Plugins/Easy Save 3/Resources/ES3/ES3GlobalReferences.asset at line 477

1. This after upgrading from Unity2021-> 2022, with existing ES3 in old project which i deleted and reinstalled + removed all linked prefabs.
2. Happens when enabling auto save
4. wondering if there is a ES3 global project file outside assets that needs to be deleted?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Getting editor errors when using Auto Save

Post by Joel »

Hi there,

Are you using the latest version of Easy Save? A new version (3.5.5) went live today. You can check your version by going to Assets/Plugins/Easy Save 3/Change Log and opening the text file.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
pierrenay
Posts: 17
Joined: Sun Sep 01, 2019 8:25 am

Re: Getting editor errors when using Auto Save

Post by pierrenay »

Hi, yes the changelog says 3.5.5
ps: the same errors occur on a new project.
unity version 2022.3.0
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Getting editor errors when using Auto Save

Post by Joel »

I'm not getting this issue in 2022.3.2f1 and haven't had any reports from our beta testers for 3.5.5.

Please could you private message me the new project containing only Easy Save so I can try to replicate it at my end.

I'd also recommend updating to the latest version of 2022.3 just in case it's a bug at Unity's end.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
pierrenay
Posts: 17
Joined: Sun Sep 01, 2019 8:25 am

Re: Getting editor errors when using Auto Save - solved

Post by pierrenay »

Thanks Joel, I've updated to latest 2022.3.2.f1 (LTS)
New project with ES3 now works.
Migrated project has issues with Textmesh pro (identifiers) which points to ES3 global variable file and this is resolved by rebuilding font atlases.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Getting editor errors when using Auto Save

Post by Joel »

Glad you managed to resolve the issue, and thanks for the info.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
spaghettiSyntax
Posts: 1
Joined: Sun Dec 31, 2023 12:35 am

Re: Getting editor errors when using Auto Save

Post by spaghettiSyntax »

THANK YOU! I had these same errors, and changing the Typo from Seach to Search also fixed my issue. I appreciate it, and I am much obliged! I'll post the code below

AutoSaveWindow.cs
Lines 102 - 108

BEFORE

Code: Select all

#if UNITY_2022_3_OR_NEWER
                        searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSearchTextField"));
                        if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSearchCancelButton")))
#else
                        searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSeachTextField"));
                        if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
#endif
AFTER

Code: Select all

#if UNITY_2022_3_OR_NEWER
                        searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSearchTextField"));
                        if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSearchCancelButton")))
#else
                        searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSearchTextField"));
                        if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSearchCancelButton")))
#endif
archer3cl wrote: Tue Jun 13, 2023 3:03 pm A fresh installation of this component, after following the tutorial for adding auto-save these errors started to show up:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.DoGetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <e35f2ca690d241b7981de4b44e6c2240>:0)
It seems that the following lines on AutoSaveWindow.cs have the wrong string when searching for a style

Code: Select all

searchTerm = GUILayout.TextField(searchTerm, GUI.skin.FindStyle("ToolbarSeachTextField"));
if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
Switching "ToolbarSeachCancelButton" to "ToolbarSearchCancelButton" fixes the issue.

Creating this forum post to ask the creators to update the package and fix this by default.
Last edited by spaghettiSyntax on Sun Dec 31, 2023 12:42 am, edited 1 time in total.
Post Reply