Currently trying to implement a saving and loading system in a unity project to be able to save and reload states of the game. The project is similar to a tabletop card game where there are cards and stacks of cards. The stacks of cards contain a LinkedList of KeyValuePairs with each node containing a card and its orientation in the pile (true = up, false = down). This looks like this:
LinkedList<KeyValuePairs<Cards,bool>> cardsList
We are already correctly saving the position, rotation and type of the objects in the project using serialization surrogates, the list of cards in them is not saved however. How would we go about creating a serialization surrogate for a LinkedList of this sort as its needed for saving and loading? We have tried implementing this in different ways but have had no luck so far, any help would be appreciated.
Edit: Sorry forgot to mention that we are using a binary formatter for this and not XML