Dictionary of Lists

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
Diggidy
Posts: 3
Joined: Thu Apr 09, 2020 10:54 pm

Dictionary of Lists

Post by Diggidy »

Attempting to save a dictionary of lists. But im getting an error. Saving lists by themselves work but not in a Dictionary. Any ideas on a workaround?

Dictionary<MechanicJobsQueName, List<string>> MechanicJobsQueDict = new Dictionary<MechanicJobsQueName, List<string>>(); //MechanicJobsQueName is an enum

ES2.Save(MechanicJobsQueDict, SaveFileName + "?tag=MechanicJobsQueDict");

System.Collections.Generic.List`1[System.String] is not currently supported or it's ES2Type was not found, but you may be able to add support for it through Assets > Easy Save 2 > Manage Types
UnityEngine.Debug:LogError(Object)
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Dictionary of Lists

Post by Joel »

Hi there,

This is not possible in Easy Save 2, but is possible in Easy Save 3.

The only alternative in Easy Save 2 is to create a wrapper and save that, as described here: https://moodkie.com/forum/viewtopic.php?f=4&t=744

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Diggidy
Posts: 3
Joined: Thu Apr 09, 2020 10:54 pm

Re: Dictionary of Lists

Post by Diggidy »

Thanks for clearing that up.

The only reason I havent jumped to ES3 was because I was having problems getting the Reader/Writer working with PS4 and I wanted the best all in one solution.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Dictionary of Lists

Post by Joel »

Ah, I see.

In Easy Save 3 you should not access the Reader/Writer, but instead use the ES3File API. I've described this here, though I can't guarantee that this will work with any particular platform apart from those on our supported list: https://docs.moodkie.com/easy-save-3/es ... rage-apis/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Diggidy
Posts: 3
Joined: Thu Apr 09, 2020 10:54 pm

Re: Dictionary of Lists

Post by Diggidy »

Joel,

Thanks for your help, always top notch support.
Locked