Search Unity

Not seeing "Share WebGL Game" option under Window menu

Discussion in 'Web' started by wirejaw, Dec 29, 2020.

  1. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
    I'm trying to share my game via WebGL. I've managed to Build and Run the game using WebGL, but I don't see the "Share WebGL Game" option under the Window menu that will allow me to share the game.

    Any help resolving this is appreciated. Thanks.

    WhereIsIt.png
     
  2. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    It has been renamed to "WebGL Publisher".
    Please install "WebGL Publisher" from Package Manager.
     
  3. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
  4. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    upload_2020-12-30_1-35-15.png
    try change to "All packages".
     
  5. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
    menu.png I don't have the "All packages" menu option.
     
  6. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
    And to complicate matters further, I confirmed that I have installed WebGL Build Support.

    menu2.PNG

    And so I can build and run my project.

    Build.PNG

    After building and running, the game loads and runs in my browser locally just fine, but I don't know how to go further and actually share the build with someone else because I can't access the "Share WebGL Game" menu option.

    Additionally, if I close the locally running build in my browser, and then try to open it again by clicking the html file link created by the build, I get several errors and the game won't run.

    Not sure what I'm missing.
     
  7. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    Sorry, I don't know this problem solution.
     
    wirejaw likes this.
  8. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    @wirejaw

    try this step.

    1. Open Package Manager
    2. left top "+" button click
    3. select "Add package from git URL..."
    4. URL input "com.unity.connect.share" and [Add] Button click

    upload_2020-12-30_14-45-26.png
     
  9. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
    Thank you gtkrk. I followed your steps and found WebGL Publisher, and have verified that I now have it installed:

    Capture1.PNG

    When I Build and Run, my game loads in my browser and I can play it just fine. Here are the files the build is making:

    Capture2.PNG

    So I still have two issues. The first is that when I close the browser that is automatically opened after Build and Run, and then try to reopen it by opening the "index.html" file (shown above), the browser opens but the game doesn't run and I get a long list of errors:

    Capture3.PNG

    The second issue is that I still don't see the "Share WebGL Game" menu option under the Window list.

    Also I can load an old project made using Unity Version 2019.3.13f1 and in that project I can Run and Build and access the Share WebGL Game option to share my game. For my new project now I am using Unity Version 2020.1.0f1, so maybe it's related to a version issue...?
     
  10. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    When opened from Explorer, it becomes file: // ~ URL, which is rejected by fetch API (XHR) for security.
     
  11. wirejaw

    wirejaw

    Joined:
    Jun 24, 2020
    Posts:
    15
    Ah I see thanks. So without the "Share WebGL Game" option, is there an alternative method I can use to share the game?
     
  12. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    For example, you can upload the Build folder to GitHub as it is and set GitHub Pages to publish it. However, GitHub restrictions apply (up to 100MB per file, GZip compression is basically not possible)
     
    ARXIVN and wirejaw like this.
  13. MykeBlack

    MykeBlack

    Joined:
    Apr 16, 2020
    Posts:
    11
    this issue has been raised in other threads. the only way it worked for me is to downgrade the game to 2019, then install from package manager, then upgrade again.
     
    ARXIVN likes this.
  14. MikkoHaavisto

    MikkoHaavisto

    Joined:
    Apr 17, 2021
    Posts:
    2
    In case someone finds this thread looking for the Window -> "Share WebGl Game" button, it's found at Publish -> WebGL Project.
     
  15. St3g1

    St3g1

    Joined:
    Jul 30, 2021
    Posts:
    1
    i don't have a publish menu neither....
     
  16. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Man...
    Then I uploaded some crap to give it a first try and no way to remove // unpublish it?
    Some topics saying to be possible accessing the UnityConnect platform to see the list of the published builds but the site is down now ahah!
    - https://answers.unity.com/questions/1690810/how-to-delete-tutorial-game-published-to-webhow-do.html

    What next then?

    Edit : and I think I am not the only one having a hard time here, someone is posting same build from the same game again and again right now :D :D :D :D :D
    upload_2021-8-25_23-12-26.png
     
    ARXIVN likes this.
  17. DistilledGuava

    DistilledGuava

    Joined:
    Jan 25, 2022
    Posts:
    1
    Is there a solution to this yet? I can't seem to find a way to share my webgl - maybe I can upload it through a wordpress site somehow?
     
  18. Blastmen

    Blastmen

    Joined:
    Aug 8, 2017
    Posts:
    2
    Hey I have installed WebGL Publisher but still can't see Share WebGL game option in Windows menu. can u help me?
     
  19. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    upload_2022-11-14_13-2-52.png
    "Publish" Menu
     
  20. Blastmen

    Blastmen

    Joined:
    Aug 8, 2017
    Posts:
    2
  21. ARXIVN

    ARXIVN

    Joined:
    Nov 21, 2023
    Posts:
    1