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

Is it possible to put a WebGL loading screen game up while your game loads?

Discussion in 'WebGL' started by Arowx, Dec 3, 2015.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Came across this loading screen game jam and wondered...

    is there a way to very quickly get a WebGL loading screen game up while your game loads and ways to monitor it loading in the background?
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    The WebGL default template contains the default unity progress bar, implemented in JavaScript (see UnityProgress.js). You can replace this with whatever content you want to build a custom progress bar/tiny game/video/whatever as your loading screen.
     
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I was going to make it in Unity so the first scene would be a quick light loading screen game?
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    I'd advise against it. Two reasons:

    -It is not currently possibly to have two pieces of Unity WebGL content on one page, as the content uses functions and variables in the global JavaScript namespace. This is on our list of stuff to fix, but not being worked on yet. You could work around that by using an iframe, though.

    -While we work hard on reducing the footprint of Unity content as much as possible, I believe that it is too heavy for a loading screen, and would take too long to load and use too many resources.
     
  5. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    That said, maybe I misread you.

    You can always make the first scene of your main content a small loader game, and load the rest of the content from there with AssetBundles. I do recommend this approach. But this would not be a replacement for the initial progress bar.
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    It would be cool to use Unity or a minimal subset of it for quick and simple games.

    Didn't you achieve a tiny minimal size project in one of your ninja dev projects?

    In this case it's just a game jam game dedicated to the loading screen so no worries.

    Keep up the great work!