SerializedMonoBehaviour dictionary not working with StringComparer.OrdinalIgnoreCase

Issue #211 resolved
Former user created an issue

Creating a SerializedMonoBehaviour with a case insensitive comparer does not register correctly. Testing in unity 5.6.3 using odin for windows 10

Testing with
public Dictionary<string, string> testDictionary= new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase);

testDictionary.Add("TEST", "test Value"); Debug.Log("Test test " + testDictionary.ContainsKey("test"));

returns false for a SerializedMonoBehaviour but true for a monobehaviour

Comments (1)

  1. Tor Esa Vestergaard

    Thanks for the report! This issue is now resolved - Odin wasn't serializing the comparers of dictionaries, so these would be reset to "default" whenever the dictionary was deserialized. In the next patch, comparers are serialized along with the dictionaries in question.

  2. Log in to comment