ES3 not working on Experimental NET 4.6

Discussion and help for Easy Save 3
Post Reply
ViralGameStudios
Posts: 3
Joined: Sat Mar 17, 2018 9:03 am

ES3 not working on Experimental NET 4.6

Post by ViralGameStudios »

Hello there!

I bought this awesome asset some time ago, and now I am trying to implement an autosave feature in my game, and I keep getting the same error. So I created a new, clean project, and tested it.

This new project worked fine with ES3AutoSaveMgr, but didn't in my project. So I tried and tried and tried... and found that the problem was because I was using the scripting runtime version "Experimental (.NET 4.6 equivalent)". When I switched to that in Edit-Project Settings-Player, the same error happened.

When I play a scene with an "Easy Save 3 Manager" GameObject, I get this error:

Code: Select all

FormatException: Expected quotation mark, found '8'.
ES3Internal.ES3JSONReader.ReadQuotationMarkOrNullIgnoreWhitespace () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:427)
ES3Internal.ES3JSONReader.Read_string () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:529)
ES3Internal.ES3JSONReader.ReadPropertyName () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:64)
ES3Reader.ReadProperty[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:118)
ES3Types.ES3Type_Vector3.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_Vector3.cs:27)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:215)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Reader.Read[T] () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:98)
ES3Types.ES3Type_Transform.ReadComponent[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/Component Types/ES3Type_Transform.cs:34)
ES3Types.ES3ComponentType.ReadObject[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:92)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:40)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:34)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:215)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Types.ES3ArrayType.Read (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:57)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:241)
ES3Reader.Read[T] () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:98)
ES3Types.ES3Type_GameObject.ReadInto[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:147)
ES3Types.ES3Type_GameObject.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:117)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:215)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Types.ES3ArrayType.Read (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:57)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:241)
ES3Reader.Read[T] (System.String key, T defaultValue) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:178)
ES3.Load[T] (System.String key, T defaultValue, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:308)
ES3AutoSaveMgr.Load () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:39)
ES3AutoSaveMgr.Awake () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:51)
Moreover, when I try to create a Save() for a GameObject with only a transform (and no other component), I get this other error:

Code: Select all

FormatException: Expected '}', found ','.
ES3Internal.ES3JSONReader.ReadCharIgnoreWhitespace (System.Char expectedChar) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:406)
ES3Internal.ES3JSONReader.EndReadObject () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:112)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:217)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Reader.Read[T] () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:98)
ES3Types.ES3Type_Transform.ReadComponent[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/Component Types/ES3Type_Transform.cs:34)
ES3Types.ES3ComponentType.ReadObject[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:92)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:40)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:34)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:215)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Types.ES3ArrayType.Read (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:57)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:241)
ES3Reader.Read[T] () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:98)
ES3Types.ES3Type_GameObject.ReadInto[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:147)
ES3Types.ES3Type_GameObject.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:117)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:215)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:245)
ES3Types.ES3ArrayType.Read (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:57)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:241)
ES3Reader.Read[T] (System.String key, T defaultValue) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:178)
ES3.Load[T] (System.String key, T defaultValue, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:308)
ES3AutoSaveMgr.Load () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:39)
TestSaveLoad.Update () (at Assets/TestSaveLoad.cs:17)
I can't change the whole main project to Mono 3.5 only for this (got tons of features using C#6).

What can I do?

If you need me to, I can mail the example project :)

ViralGameStudios
Posts: 3
Joined: Sat Mar 17, 2018 9:03 am

Re: ES3 not working on Experimental NET 4.6

Post by ViralGameStudios »

More updates (= more info for the dev).

Then problem seems to be with the JSON parser/writer. When I save an sphere with only a transform, the 3.5 version creates a valid JSON
SaveData35.es3.txt
Right formatted JSON (stable mono 3.5)
(1.49 KiB) Downloaded 222 times


However, when I save the sphere using Mono 4.6, the JSON created is NOT valid
SaveData46.es3.txt
Wrong formatted JSON (experimental mono 4.6)
(1.48 KiB) Downloaded 208 times
The problem is this: with 3.5, the parsing of a float is valid, but with 4.6 it is split into two lines: (check the "z" for this localPosition):

Code: Select all

"localPosition": {
					"x": 0,
					"y": 0,
					"z": -5.53
}

Code: Select all

"localPosition": {
					"x": 0,
					"y": 0,
					"z": -5,
					53
				}
So the problem must be with the JSON Saver and the comma operating values.

I will investigate further and post the results ;)

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

Re: ES3 not working on Experimental NET 4.6

Post by Joel »

Hi there,

Thanks for the detailed bug report.

We're not officially supporting .NET 4.6 until it's no longer experimental. However, the error you're encountering appear to be because StreamWriters take account of the culture info. which doesn't happen in 3.5.

This is an easy fix at our end, and if you PM me your invoice number I'll send you an update to address this. You will also need to delete the old save data containing the commas.

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

ViralGameStudios
Posts: 3
Joined: Sat Mar 17, 2018 9:03 am

Re: ES3 not working on Experimental NET 4.6

Post by ViralGameStudios »

Thanks a lot!!! PM'ed you.

:)

fweds
Posts: 2
Joined: Fri May 11, 2018 4:39 pm

Re: ES3 not working on Experimental NET 4.6

Post by fweds »

Hi,

I have the same error with .NET 4.6.
I've had Easy Save for a long time and I can not find my invoice number. In my Unity account, the shopping list does not go far enough. I bought your Asset before August 2016 :(

How can I have the correction? I am stuck because of this error in my project.

Thank you

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

Re: ES3 not working on Experimental NET 4.6

Post by Joel »

Hi there,

Unfortunately we cannot provide update packages without an invoice number. However, if you email the Asset Store on assetstore@unity3d.com, they should be able to find this for you.

They will have also sent you an invoice via email, so it's worth searching your email for "Easy Save".

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

fweds
Posts: 2
Joined: Fri May 11, 2018 4:39 pm

Re: ES3 not working on Experimental NET 4.6

Post by fweds »

Joel wrote:Hi there,

Unfortunately we cannot provide update packages without an invoice number. However, if you email the Asset Store on assetstore@unity3d.com, they should be able to find this for you.

They will have also sent you an invoice via email, so it's worth searching your email for "Easy Save".

All the best,
Joel
I contacted Unity, just wait, in the meantime I came back in .NET 3.5 ...

Post Reply