Search Unity

UnityLoader.js blocking question

Discussion in 'Web' started by pixelmolkerei_Shad, Oct 28, 2016.

  1. pixelmolkerei_Shad

    pixelmolkerei_Shad

    Joined:
    Nov 25, 2015
    Posts:
    2
    Can UnityLoader.js be modified so that it does not block the browser for several seconds when it has finished loading? (Basically, is it possible to spread the final steps of compilation (or whatever it does at the end) over several frames (e.g. using the setTimeout() function)?)

    My coworker and I have looked through this thread (https://forum.unity3d.com/threads/unity-in-a-web-worker.374168/) and a few others and we just think that as long as the screen is active, the loading time would be less of an issue for our products.

    Thank you!
     
  2. stephanwinterberger

    stephanwinterberger

    Joined:
    Aug 22, 2016
    Posts:
    27
  3. pixelmolkerei_Shad

    pixelmolkerei_Shad

    Joined:
    Nov 25, 2015
    Posts:
    2
    Hello @stephanwinterberger! Thanks for the link. My coworker and I think this could really help with loading times, but we are actually pretty concerned with the visual part of loading. Our client wanted a smooth loader of a particular kind that would only work properly if we could have an unblocked browser.

    We did find a workaround we were satisfied with. After finding that css animations of a certain type were not blocked, my boss was able to use this list (https://csstriggers.com/) to create a combination of css animations that relied only on the GPU, as these were not blocked during loading. There were some definite limitations, such as not finding a way to use step, but we managed to get a replication of our original concept for the loader with this method. I hope this helps! It did not actually speed up the loading time, but we like to think it made it more entertaining.