Forum Discussion
AN0NlM0
3 years agoHonored Guest
Unity JsonUtility can't find constructor on build
Hi all, I'm trying to manage a bunch of simple API calls via Json and the system works fine on Editor but when I build and play on the Oculus any time it should serialize or deserealize a Json it returns this error :
Saying it could not find the constructor for the class to deserialize. I have researched that maybe Unity is stripping the constructors on Android builds because the utility is using reflection and doesn't find any references to those constructors so I tried using "Preserve" and "JsonConstructor" attributes as the error suggest, turning of the stripping of code and making some "fake" direct calls to the constructors from the code with no result.
Any ideas what could be wrong?
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 9 months ago