Hi there,
I would like to save a queue of enums but I am having issues, how can I do this? I have the queue stored in a class called GameData, so ideally I would be able to simply save it as part of GameData (which is an ES2UserType I have already defined that contains various primitives (ints, bools, etc.)), but I can't even seem to save the queue of enums as a standalone data type.
I also tried creating a wrapper like what is seen here: https://docs.moodkie.com/easy-save-2/su ... ollections -> where the wrapper simply holds the queue of enums, but this doesn't seem to work either
When I try, easy save simply says that it is not supported
Please help
Saving a queue of enums
Re: Saving a queue of enums
Hi there,
Firstly, I would strongly recommend using Easy Save 3, as Easy Save 2 is only included for backwards compatibility.
With regards to saving and loading Queues of enums, you can do so with the ES2.Save(myQueue, "myQueue") and myQueue = ES2.LoadQueue<EnumType>("myQueue").
With Easy Save 3, you can do this using ES3.Save<Queue<EnumType>>("myQueue", myQueue) and myQueue = ES3.Load<Queue<EnumType>>("myQueue").
All the best,
Joel
Firstly, I would strongly recommend using Easy Save 3, as Easy Save 2 is only included for backwards compatibility.
With regards to saving and loading Queues of enums, you can do so with the ES2.Save(myQueue, "myQueue") and myQueue = ES2.LoadQueue<EnumType>("myQueue").
With Easy Save 3, you can do this using ES3.Save<Queue<EnumType>>("myQueue", myQueue) and myQueue = ES3.Load<Queue<EnumType>>("myQueue").
All the best,
Joel