Dictionaries become empty when pressing play

Issue #714 resolved
Harry created an issue

odin: 3.0.1.0
unity: 2019.4.11
windows pc: build for android.

my code:

public class FlagsConfig : SerializedScriptableObject
{
    public Dictionary<string, Sprite> Flags = new Dictionary<string, Sprite>();
}

Repro Steps:

  1. Fill out the dictionary:

2. Press play.

3. You lose your data:

Comments (4)

  1. Antonio Rafael Antunes Miranda

    This should work and doesn’t reproduce for me using your setup. If there are any additional steps or information you can give, please share them.

  2. Antonio Rafael Antunes Miranda

    I'll mark this as resolved since I couldn't reproduce it and the reporter hasn't provided any additional information. If you encounter this issue make sure to check that your dictionary is being serialized correctly. The serialization debugger can help you with that and is accessible via the context menu of the inspected object. 🙂

  3. Log in to comment