Page 6 of 9

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Tue Jan 25, 2022 6:26 pm
by xyztankman
Perfect, that's exactly what I was looking for.

Thanks Joel!

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Sat Feb 19, 2022 12:46 am
by Drandy007
I'm trying to create a save system using EasySave3. I've got it to save when the variable (ScriptableObject data type) is set in the Inspector but, I need to create an instance of the scriptableobject at runtime, so can't be set in Inspector. It keeps coming up with

ArgumentNullException: Value cannot be null.
Parameter name: s
System.Convert.FromBase64String (System.String s) (at <695d1cc93cca45069c528c15c9fdd749>:0)
ES3Internal.ES3JSONReader.Read_byteArray () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:561)
ES3Types.ES3Type_byteArray.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Primitive Types/ES3Type_byteArray.cs:24)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:272)
ES3Types.ES3Type.ReadProperties (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:155)
ES3Types.ES3ReflectedValueType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Reflected Types/ES3ReflectedValueType.cs:30)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:249)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3Types.ES3Type.ReadProperties (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:155)
ES3Types.ES3ReflectedScriptableObjectType.ReadScriptableObject[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Reflected Types/ES3ReflectedScriptableObjectType.cs:24)
ES3Types.ES3ScriptableObjectType.ReadObject[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ScriptableObjectType.cs:69)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:54)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:47)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:249)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3Reader.Read[T] (System.String key) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:197)
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:391)
ES3.Load (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:348)
RPG.PlayerSystem.FirstPersonController.RestoreState () (at Assets/Project(Saving)/Scripts/Player/FirstPersonController.cs:64)
RPG.SavingSystem.SaveableEntity.RestoreState () (at Assets/Project(Saving)/Scripts/Saving/SaveableEntity.cs:33)
RPG.SavingSystem.SaveManager.Load () (at Assets/Project(Saving)/Scripts/Saving/SaveManager.cs:70)
RPG.SavingSystem.SaveManager.Update () (at Assets/Project(Saving)/Scripts/Saving/SaveManager.cs:53)

Is there a way to get it to work?

EDIT: Moved to General Discussion. https://moodkie.com/forum/viewtopic.php?f=13&t=2486

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Sat Feb 19, 2022 8:12 am
by Joel
Drandy007 wrote: Sat Feb 19, 2022 12:46 am I'm trying to create a save system using EasySave3. I've got it to save when the variable (ScriptableObject data type) is set in the Inspector but, I need to create an instance of the scriptableobject at runtime, so can't be set in Inspector. It keeps coming up with

ArgumentNullException: Value cannot be null.
Parameter name: s
System.Convert.FromBase64String (System.String s) (at <695d1cc93cca45069c528c15c9fdd749>:0)
ES3Internal.ES3JSONReader.Read_byteArray () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:561)
ES3Types.ES3Type_byteArray.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Primitive Types/ES3Type_byteArray.cs:24)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:272)
ES3Types.ES3Type.ReadProperties (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:155)
ES3Types.ES3ReflectedValueType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Reflected Types/ES3ReflectedValueType.cs:30)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:249)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3Types.ES3Type.ReadProperties (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:155)
ES3Types.ES3ReflectedScriptableObjectType.ReadScriptableObject[T] (ES3Reader reader, System.Object obj) (at Assets/Plugins/Easy Save 3/Scripts/Types/Reflected Types/ES3ReflectedScriptableObjectType.cs:24)
ES3Types.ES3ScriptableObjectType.ReadObject[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ScriptableObjectType.cs:69)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:54)
ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:47)
ES3Reader.ReadObject[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:249)
ES3Reader.Read[T] (ES3Types.ES3Type type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3Reader.Read[T] (System.String key) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:197)
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:391)
ES3.Load (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:348)
RPG.PlayerSystem.FirstPersonController.RestoreState () (at Assets/Project(Saving)/Scripts/Player/FirstPersonController.cs:64)
RPG.SavingSystem.SaveableEntity.RestoreState () (at Assets/Project(Saving)/Scripts/Saving/SaveableEntity.cs:33)
RPG.SavingSystem.SaveManager.Load () (at Assets/Project(Saving)/Scripts/Saving/SaveManager.cs:70)
RPG.SavingSystem.SaveManager.Update () (at Assets/Project(Saving)/Scripts/Saving/SaveManager.cs:53)

Is there a way to get it to work?
Hi there,

As this thread is for requesting examples, please could you create a thread in General Discussion about your issue providing as much detail as possible on how you’re saving and loading your data, and the types of data you’re saving.

All the best,
Joel

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Wed Mar 02, 2022 11:44 am
by Besticle
Hi there!

I'm using dictionaries with FixedString32Bytes types (Unity.Collections.FixedString32Bytes). Is it possible to make a custom ES3Type, which handles FixedStrings as regular strings when saving?

In ES3Type i'm using the "writer.Write(instance.ToString());" command, which technically works but in the JSON it creates { } brackets around the string. I would like to get rid of these brackets. Though the brackets are just a small inconvenience, they still annoy me more than it should :lol:

Cheers!

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Wed Mar 02, 2022 11:52 am
by Joel
Hi there, and thanks for getting in contact.

You would need to convert your class to a string outside of the ES3Type and save that. The ES3Type will always save it as an object rather than a raw string because the type you are saving is non-primitive.

As this thread is for example requests, if you require further assistance on this issue please could you create a new post in the General Discussion forum.

All the best,
Joel

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Wed Mar 02, 2022 10:16 pm
by Chadedala
Hello Joel.
Fist thanks for the Help in the Past.

i run into a small Problem, maybe my mind goes in the wrong direction.

i have a public list, ,from a GameObject (scriptableObject - Inventory Item).
So good so far.

I want to save that list, but:
i use "LoadInto / saveInto"

now the Problem is - the Objects do not come up in my LIst only the Entrys, but all GameObjects are empty.

now : i think EasySave can not handle this in this way.
Any Idea i can reach the Point, to save my Items in a List ?
( Maybe i can define one Scriptable Object for, or something )

i have searched here a while, but found nothing to my Problem.

best Greetings.

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Thu Mar 03, 2022 9:06 am
by Joel
Chadedala wrote: Wed Mar 02, 2022 10:16 pm Hello Joel.
Fist thanks for the Help in the Past.

i run into a small Problem, maybe my mind goes in the wrong direction.

i have a public list, ,from a GameObject (scriptableObject - Inventory Item).
So good so far.

I want to save that list, but:
i use "LoadInto / saveInto"

now the Problem is - the Objects do not come up in my LIst only the Entrys, but all GameObjects are empty.

now : i think EasySave can not handle this in this way.
Any Idea i can reach the Point, to save my Items in a List ?
( Maybe i can define one Scriptable Object for, or something )

i have searched here a while, but found nothing to my Problem.

best Greetings.
Hi there,

As this section is for example requests rather than issues please could you create a new thread in General Discussion, also providing samples of the code you’re currently using and the data you’re trying to save.

All the best,
Joel

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Sat Mar 05, 2022 8:49 pm
by Chadedala
Hello Joel, i wrote you a PM, to explain it so good as possible.

best Greetings, and thank you.

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Wed May 25, 2022 4:32 pm
by DylanAron
Hi are there any examples to autosaving Scriptable Objects?

I am trying to autosave multiple scriptable objects, and I am not sure how to go about this

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Posted: Wed May 25, 2022 4:58 pm
by Joel
Hi there,

By autosaving do you mean using our Auto Save functionality? Auto Save is intended for GameObjects and their Components, so you would need to use code.

Using code, ScriptableObjects are saved and loaded like any other object. I.e. ES3.Save to save them, and ES3.Load to load them. There is an example of this here:

https://moodkie.com/forum/viewtopic.php?f=16&t=1889

All the best,
Joel