Page 1 of 1

Getting editor errors when using Auto Save

Posted: Tue Jun 13, 2023 3:03 pm
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.

Re: Getting editor errors when using Auto Save

Posted: Wed Jun 14, 2023 8:12 am
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

Re: Getting editor errors when using Auto Save

Posted: Mon Jun 19, 2023 12:03 pm
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?

Re: Getting editor errors when using Auto Save

Posted: Mon Jun 19, 2023 1:37 pm
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

Re: Getting editor errors when using Auto Save

Posted: Mon Jun 19, 2023 1:54 pm
by pierrenay
Hi, yes the changelog says 3.5.5
ps: the same errors occur on a new project.
unity version 2022.3.0

Re: Getting editor errors when using Auto Save

Posted: Mon Jun 19, 2023 2:51 pm
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

Re: Getting editor errors when using Auto Save - solved

Posted: Tue Jun 20, 2023 11:49 am
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.

Re: Getting editor errors when using Auto Save

Posted: Tue Jun 20, 2023 2:06 pm
by Joel
Glad you managed to resolve the issue, and thanks for the info.

All the best,
Joel

Re: Getting editor errors when using Auto Save

Posted: Sun Dec 31, 2023 12:37 am
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.