[Unity] How to serialize a Dictionary

The right way for doing it is simply given by the Unity’s documentation, but if you don’t have the right pointer or keyword when you start googling for it, you’ll face one of the main Unity’s downside : the incredible amount of bad / of subject / out of date solutions…

As a resume of the documentation, the key is this interface ISerializationCallbackReceiver. It lets you execute your custom serialize/deserialize code and this way you can use List to store the Keys and Values of your Dictionary.