- Home /
Unity building to WebGL crashes computer when building libraries or native JS files
I have a fairly simple 2D game which I need to build into WebGL so I can have it hosted on a website however every time I try to build it, it crashes and freezes my computer. I have previously built to WebGL with my code before and I'm not yet totally sure what is causing it. I have tested building to normal .exe and it built and ran without any problems.
Has anyone else experienced this problem? What did you do to fix it?
Unfortunately not fully, it seems as if some functions and some more complex c# based code might break JS and WebGL. If you got it working previously I recommend trying to revert back piece by piece and attempt to deter$$anonymous$$e which change you made caused the issue. Test building after each segment of code you revert, this will take a while but its what I did to figure out what I was doing wrong.
I don't have a great answer why this works or doesn't but that's what I did to fix it. Good Luck!
Same problem. Well ... in my case, il2cpp.exe crashes whilst attempting the WebGL build - Unity 2017.1 continues to run (on Windows 7 Pro 64-bit).
I had similar issues with the final release of Unity 5.6, too - though I was able to finally get that to work by disabling 'strip engine code' from BUILD SETTINGS > PLAYER SETTINGS. Sadly, not having so much luck with Unity 2017.1.0f3.
I also tried building an almost empty project - with just a scene file and no other assets or scripts - same crash. So I can't see how the project is in any way responsible for this problem. Changing the Scripting Runtime Version from .NET 3.5 to .NET 4.6 or the API Compatibility Level from .NET 2.0 Subset to .NET 2.0 makes no difference for me.
Answer by shavini · Jul 18, 2017 at 09:37 PM
Yeah it crashed for me too the first few times I was trying . Then when I tried last week it worked but now it's not running ... I just get a blank screen when I open on the browser. But the standalone app works perfectly. I donno why .
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
WebGL loading on browser not working 0 Answers
Brower blowing up after login (crash) 2 Answers
Is there a way to make a box display a URL or HTML code? 1 Answer