StringReferenceResolver does not respect white space when using JSON to deserialize but works with Binary
Issue #606
new
I am serializing a simple class that has a reference to a ScriptableObject. I use the StringReferenceResolver with a collection of strings, using the name of the ScriptableObject as the reference key. Unfortunately, if using JSON, it doesn’t work if the string has a space in it.
To reproduce:
- Open the scene in the attached project and select the only gameobject in the scene and play
- Press “s” to save, and then “l” to load. Note the “Loaded Character Test” displayed in the inspector
- Note it only loaded one of the ScriptableObject references- the one without whitespace in the name.
If SerializationUtility.SerializeValue is switched to Binary mode, it does work as intended.
Using Odin 2.1.8 on Unity 2019.3f1 Win 10