Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity game on browser without WebGL

Discussion in 'Editor & General Support' started by BrucePlayz321, Feb 4, 2021.

  1. BrucePlayz321

    BrucePlayz321

    Joined:
    Nov 13, 2020
    Posts:
    5
    I've made a 3D game on unity, and I wanted to put it on a website so my friends don't have to download it when they want to play it. The problem is, when I build it as a WebGL, there were numerous glitches with the gameplay that didn't happen on the .exe standalone. Is there a way to run a .exe on a web browser? Because the glitches were really annoying and ruins the gameplay.
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,657
    Nope... and it's good that this isn't possible at all. Otherwise, there would be just another entry point for malware & co.

    What you can do is to find out what causes these glitches and how to fix them.
     
  3. BrucePlayz321

    BrucePlayz321

    Joined:
    Nov 13, 2020
    Posts:
    5
    What's weird is that everything runs fine on standalones for mac OS builds and .exes, but once I build it as a WebGL, things start glitching. It might be something that happened while it was building it, but I don't know. I'll have to look up more info about this glitch.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    WebGL is significantly more limited than standalone builds. One of the biggest difference is no multithreading. Anything in a standalone build that would run in a separate thread is instead run on the main thread. A lot of the engine now runs in its own threads for standalone builds, even if you're not implementing multiple threads yourself. You're also entirely dependent on whatever resources and performance the browser allocates instead of actually having control over it.

    https://docs.unity3d.com/Manual/webgl-performance.html
     
    James_Arndt likes this.
  5. BrucePlayz321

    BrucePlayz321

    Joined:
    Nov 13, 2020
    Posts:
    5
    So is there any workaround? a different type of build that can run on a browser/doesnt have to be downloaded that can work just as well?
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Not from Unity. But just to be clear on the "doesn't have to be downloaded" part, the player is still downloading the game for WebGL. You're not saving them the bandwidth of downloading. You're just saving them the few mouse clicks of unzipping or installing the game after the download.
     
    ericthecyclist likes this.