- Home /
Build to WEBGL: IL2CPP NullReferenceException in browser
I've built my game for WEBGL and when running the game in a browser an error comes up every time when a specific action takes place in my game. In the editor there is no error when the action takes place so I think this error may occur when Unity builds my game for WEBGL (Maybe??) since it has to convert code.
I have the option "Strip code" in build settings off because I didn't want Unity to accidently remove a section of code that was in use. Could the problem not be with my code and possibly with IL2CPP? What could I do to try and fix this error? Is there a way to get this error to show itself in the editor by testing WEBGL compatibility in the editor? If you need more information please let me know, I've been working on this for a while now with no success.