Saving List<T> Issues

Discussion and help for Easy Save 3
Post Reply
tehkyy
Posts: 2
Joined: Fri May 04, 2018 10:10 pm

Saving List<T> Issues

Post by tehkyy »

I'm trying to save multiple lists of custom scriptable objects, but I'm not finding much information about saving (and reloading) any kind of List<T>. The ES3Type file filled in lots of the read and write code for most of the other properties and fields but did not touch my public lists.

Can someone point me in the right direction or help me out?
tehkyy
Posts: 2
Joined: Fri May 04, 2018 10:10 pm

Re: Saving List<T> Issues

Post by tehkyy »

Looks like my the custom scriptable objects needed parameterless constructors. Created them, but still un-sure if the data will be saved, and how it will be set? Things seem to be VERRRY slow to save, can't yet confirm it will work but I'm closer.

Update: Froze Unity, have not re-attempted.
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving List<T> Issues

Post by Joel »

Hi there,

Please could you show me what you're doing at the moment to store them?

Also regarding the slow performance, it sounds like you might be encountering a bug at Unity's end which they're planning on fixing in a later version of Unity 2018. However, if you PM me your invoice number I can send you an update which works around this.

Also just to clarify, Lists are saved and loaded in the same way as any other data. i.e.
ES3.Save<List<MyClass>>("myKey", myList);
myList = ES3.Load<List<MyClass>>("myKey");
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply