Trouble with WebGL game
My game is rather simple, and I'm trying to upload it to itch.io. When running the game through unity, it works fine. But after I build and run the html file, I get this error message.
I've tried to run a new blank project and got the same message. Note, I see no error logs in the console. Only when I'm trying to run it online. If anyone has a solution or needs more info, please respond. Thanks.
Answer by jamesparksart · Nov 04, 2021 at 07:30 PM
Hey @robinjk9. I am in no way an expert on this, but because of past experiences this is what I know. You can't run the index.html straight from the files system. The web browsers won't allow it, but when you click "Build and Run" from unity it will pop up the first time because Unity sets up a local host for you to try the game. You can try to load it up on simmer.io, itch.io, or Unity's "Unity Play". See this page for more detail on how to build for webgl.
https://learn.unity.com/tutorial/how-to-publish-for-webgl#5d92519bedbc2a130fa21789
In the "Next Steps" area there is a link to the Unity Play
Hope this helps.
Answer by robinjk9 · Nov 04, 2021 at 08:47 PM
I tried to run it through Unity Play, but the game stops when loading to 90% https://play.unity.com/mg/other/space-brush
Yeah, I have the same problem. I even tried all the... resolutions and it still hangs at 90%. Just so it helps what I have heard are:
In player settings. 1.) Turn off compression 2.) If that does not work make sure Data caching is disabled
Hope one of those helps with your game. I am still trying to figure out why $$anonymous$$e is not working. I will let you know if I find a solution. Let me know if you find one as well.
Thanks, but it didn't fix it. I'll let you know if I find a solution.
Your answer
Follow this Question
Related Questions
WebGL Cardboard VR (GVR) errors 1 Answer
Error after compiling WebGL 1 Answer
Unity 2019.3.9f1 WebGL build error TypeLoadException when making release build 3 Answers
WebGL: Incorrect Header Check 1 Answer
WebGL version will not build 0 Answers