Gabii WebGL UX
Closed this issue · 5 comments
- If user is on a mobile or tablet, do not load the WebGL and let them know that the WebGL is not compatible.
- Create loading indicators while WebGL loads
I have a recollection that the loading screen was going to be built into the game itself, once it was compiled with a new Unity version or something?
Yes, but it does not seem like they will have moved it to a paid version of Unity by the end of the month. Also, doing some reading the WebGL loader is terrible regardless of version. So I was thinking of implementing something like this for the loading screen:
@conorom I spoke with the Gabii authors today and they were very opposed to the idea of not auto-loading the WebGL file upon initialization of the e-reader. I have modified the acceptance criteria based on their input.
edit: this was all removed here:
7480a59
... i.e. just don't set onProgress
at all, and UnityLoader has it all built-in, including images. Don't know why that didn't work with earlier builds. I'm pretty sure I tried it.
previous comment follows....
As a starting point I tried to fix the existing progress stuff by adding CSS/image assets to the Rails pipeline. I then experimented with the above fancy loader, which is very out-of-date. The whole DOM thing it's doing does not apply to our Unity version. Even the targeting of the canvas
div for the game content isn't the same any more. However, there is a thread that eventually gets to the point of people trying to convert that exact solution for 2017 Unity:
https://forum.unity.com/threads/better-loading-indicator-in-webgl.335481/
There are no ready/working solutions there, however, and working in Rails makes it harder again. Given the requirement of including more JS stuff and new assets, and the problems we still have to fix, I think a fancier loading bar is definitely a "later if at all" thing. Too much flux.
The custom onProgress method in the PR seems to get the built-in loader working just fine.