Issue with ScriptableObject and enum

Discussion and help for Easy Save 3
Post Reply
7thsmith
Posts: 4
Joined: Sat Dec 18, 2021 9:42 pm

Issue with ScriptableObject and enum

Post by 7thsmith »

Hello,
Great software and just getting started using it.
I am getting a FortmatException: Input string was not in correct format, when I try to load a scriptable object.

I have a UI button that I am using to test saving the scriptable object and then loaded it back. I have attached three files.

Unity_Error.txt - Is the error fro Unity
Unity_Level_script.txt - The scriptable script I am trying to save and load.
Unity_LevelButton_Script.txt - Is the UI button code I am using to save and load.

Thank you.
Attachments
Unity_LevelButton_Script.txt
UI Button used to save and load the
(473 Bytes) Downloaded 92 times
Unity_Level_Script.txt
The Level trying to be saved
(968 Bytes) Downloaded 95 times
Unity_Error.txt
Error from Unity
(3.04 KiB) Downloaded 96 times
williewight
Posts: 5
Joined: Mon Nov 09, 2020 8:02 pm

Re: Issue with ScriptableObject and enum

Post by williewight »

I'm having similar difficulty with enums. I get the same error when have an enum in my specified types.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue with ScriptableObject and enum

Post by Joel »

Hi there,

I believe this is resolved in our upcoming update. If you private message your invoice number to me I'm happy to send this over before it goes live in January.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
7thsmith
Posts: 4
Joined: Sat Dec 18, 2021 9:42 pm

Re: Issue with ScriptableObject and enum

Post by 7thsmith »

Hi Joel,

Send a private message yesterday, just making sure you got it.
7thsmith
Posts: 4
Joined: Sat Dec 18, 2021 9:42 pm

Re: Issue with ScriptableObject and enum

Post by 7thsmith »

Thanks Joel, that update worked. No more errors.

I am seeing something different now. I have a sprite in my scriptableoject that seems to not be copied through the Easy Save. I have attached three files.
The "In_script.png" is a screen shot of the spirit added to the file through Unity.
The "In_Game.png" is a screen shot of when the code is copied to my game manager object in Unity.
The last one, "EasySave.png", is the code in the es3 file.

Thanks again.
Attachments
EasySave.png
EasySave.png (4.25 KiB) Viewed 1257 times
In_Game.png
In_Game.png (3.35 KiB) Viewed 1257 times
In_Script.png
In_Script.png (2.47 KiB) Viewed 1257 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue with ScriptableObject and enum

Post by Joel »

Hi there,

Unfortunately it wouldn’t be possible for me to understand what is happening from what you’ve sent. Please could you replicate this in a new project with a simple scene and private message it to me with instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
7thsmith
Posts: 4
Joined: Sat Dec 18, 2021 9:42 pm

Re: Issue with ScriptableObject and enum

Post by 7thsmith »

Thanks Joel. While making the new simple project, I think I found the issue. I had a ES3 manager in one scene and another one in another scene. The second manager did not have reference to the spirit. I put a don't destroy on load to the ES3 manager and then it worked.

Is that best practice for the ES3 manager?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue with ScriptableObject and enum

Post by Joel »

Hi there,

Glad you resolved your issue. That’s a suitable way of dealing with it.

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