2
\$\begingroup\$

I am testing a game I build it on webgl and opened it on Google Chrome but nothing showed up just a screen with unity logo and no loading screen, then I tried on Firefox and it ran smoothly without any issues I am using unity 5.3.3f1 and Chrome 48 what can be the issue? I am really looking forward for your replies, I searched on internet but in vain and not too many people answered this question on internet.This is what I get when I run it on Chrome.

\$\endgroup\$
2
\$\begingroup\$

Web Gl does not work in Chrome running from file system.

I suggest one of two solutions:

  1. Run with Firefox for quick testing of a build.
  2. Upload to a server if you have it or to your Public-folder on dropbox. Right click on the index file, copy the URL and then test in different browsers.
\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks 1+ for the tips and sorry for late reply I was busy in something I am glad that I atleast get some directions I will test the second method it seem so simple I don't have to set some local server if dropbox can do this for me thank you very much. \$\endgroup\$ – Daniyal Azram Feb 27 '16 at 16:46
  • \$\begingroup\$ I am marking your comment as answer it works for me huge thanks:) \$\endgroup\$ – Daniyal Azram Feb 27 '16 at 17:22
  • \$\begingroup\$ Sure no problem! I have tried to deploy to OneDrive as well but couldn't get it to work. Dropbox works for testing but be aware that there is some kind of limit to how many can access your game in one day. \$\endgroup\$ – Mikael Högström Feb 28 '16 at 8:18
  • 1
    \$\begingroup\$ Related: Why do I need a local server for HTML5 game development? \$\endgroup\$ – Anko Feb 28 '16 at 13:32
2
\$\begingroup\$

I'm not sure but I think that Chrome won't let you execute webgl content from file for security reasons. If you chose build and run unity should start a local server with that it should work. Also there had been a problem with Chrome and webgl but I think they've fixed that by now.

\$\endgroup\$
  • \$\begingroup\$ if it was for some security reason, Unity should have announced it or they may have announced and I haven't heard or read it yet:p anyway thanks for helping:) \$\endgroup\$ – Daniyal Azram Feb 27 '16 at 16:48
1
\$\begingroup\$

Make sure you're not using the default "Arial" font anywhere. WebGL does not support it. You need to import a font and then set all text resources to use it.

When I failed to do so, I got a grey screen that never finished loading, it would just hang.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.