Open shikui08 opened 6 years ago
Updates: Along with Utf8Json, I also tested Newtonsoft.Json, fastJson. All work great in Unity Editor and none works on Android with almost identical crash log.
Only exception is UnityEngine.JsonUtility and it works on all occasions, .
My Unity project settings:
Scripting Runtime Version (.Net 3.5 equivalent)
Scripting Backend (Mono)
API Compatibility level (.Net 2.0 subset)
Simply imported Utf8Json.Unity.1.3.7.1.unitypackage.
My usage is very simple:
Where
data
is instance of some very basic classes, such as.Everything works well on Windows, both in editor and standalone . However, when compiled & run on Android, Unity crashes without any useful information. Had to Debug.Log a lot like above. Took my a lot of time until I found out that
JsonSerializer.Serialize(data);
is suspicious because the Log prints:Unity version is 2017.1.0f3. Please anybody can help me? Is this just some bizarre behavior I encountered or a common bug? Can somebody test on Unity/Android?
Thanks guys!