Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Unity WebGL not supported on Google Chrome?

Discussion in 'General Discussion' started by MidgardDev, Mar 3, 2015.

Thread Status:
Not open for further replies.
  1. MidgardDev

    MidgardDev

    Joined:
    Dec 11, 2012
    Posts:
    47
    Hi there, after watching the special event stream, I wanted to give it a try and build a simple project to the WebGL experimental platform.

    My surprise is that a message pops up on Google Chrome saying that it does not support Unity's WebGL opening files with file:// or something like that.

    Is it definitely not supported right now?
     
  2. Neoku

    Neoku

    Joined:
    Oct 27, 2014
    Posts:
    261
    possibly is not Unity, Chrome for security reasons dont allow to load local files.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    WebGL is supported on Chrome. Opening local files is not supported in the webplayer due to security reasons; I expect the same for WebGL.

    --Eric
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Chrome does not support WebGL content from file:// urls - Use Build & Run, or upload it to a server - or use Firefox.
     
    SweatyChair likes this.
  5. Thjellesen

    Thjellesen

    Joined:
    Oct 7, 2014
    Posts:
    17
    Try the google flag, add --allow-file-access-from-files after the chrome.exe like "chrome.exe --allow-file-access-from-files"
     
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
  7. MidgardDev

    MidgardDev

    Joined:
    Dec 11, 2012
    Posts:
    47
    But that's not a nice solution in user-experience..
     
  8. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Users are supposed use the project from a website and not from local disk
     
    angrypenguin likes this.
  9. Ankhranum

    Ankhranum

    Joined:
    Aug 21, 2012
    Posts:
    5
    I recommend installing a webserver like wamp. After the setup is done you just have to place all files in the 'www' directory and put your server online. Also, make sure WebGL is enabled by default in Chrome. This can be done in chrome://flags.
     
  10. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Really, the easiest solution is to use Build & Run. It will start a little local web server for you transparently, and load the page through that.
     
    jphollanti and AndrewGrayGames like this.
  11. MidgardDev

    MidgardDev

    Joined:
    Dec 11, 2012
    Posts:
    47
    Oh that's actually pretty nice, why didn't you say that before! Haha!

    Then it's just brilliant, thanks for the info sir!
     
  12. Woodlauncher

    Woodlauncher

    Joined:
    Nov 23, 2012
    Posts:
    173
    :)
     
    angrypenguin likes this.
  13. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,110
    I'm having this problem in Safari, not on my machine, but on another that doesn't have Unity installed. Since the last WebGL update, running from our server no longer works. While I'm trying to figure that out, I sent out a WebGL folder to someone to run locally so they could review it. They have JS and WebGL enabled in Safari So why does it run locally on my machine? Works fine whether I do a build and run or just open the index file in Safari.
     
  14. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,219
    Different version of Safari?
     
  15. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,658
    If your user is to be loading from a local drive give them a stand alone ;)
     
    AndrewGrayGames and Ryiah like this.
  16. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,110
    OS 10.10.5 on my machine where it runs in Safari 9.0, OS 10.11.x on the machine it doesn't run on with, I believe, Safari 9.0.1.

    Are you saying some versions of Safari don't support running locally?
     
  17. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,219
    Don't know, but that may be the case.
     
  18. raskar

    raskar

    Joined:
    Jul 12, 2017
    Posts:
    2
    Hello
    I got the same prob. while using WebGL,
    so I am using the same build & run, but this time I didn't get error but its still showing in gray color plz help me
     
  19. NightMARE43

    NightMARE43

    Joined:
    Jun 6, 2017
    Posts:
    34
    No, Unity WebGL isn't supported on Chrome. You may use internet explorer (the nice old browser supports it)
     
  20. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    It was supported two years ago when the post you're replying to was written, and it's certainly supported now.

    Internet Explorer does not support WebGL. Edge does, though. https://docs.unity3d.com/Manual/webgl-browsercompatibility.html

    --Eric
     
  21. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,658
    That would be webplayer, which Unity no longer supports.
     
    LUCID-Rob and angrypenguin like this.
Thread Status:
Not open for further replies.
unityunity