Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL in mobile phones.

Discussion in '2021.1 Beta' started by Steven_Damian, Mar 14, 2021.

  1. Steven_Damian

    Steven_Damian

    Joined:
    Mar 1, 2021
    Posts:
    65
    WebGL support for mobile phones would be a game changer. I mean i can already load my projects into mobile phones and i just comment the line in the html to remove the warning. The problem is with the decompression. When trying to load my brottli compressed builds it gets stacked at 90% for about 5 seconds. Making the decompression faster or anything else that would increase the loading speeds, will be a game changer for sure.
    Any thoughts/solutions please? Thank you.
     
    Inter-Illusion likes this.
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    In theory Tiny should reduce build size but is still in development and may not have all the features your game needs.
     
  3. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    It would be nice to have, but I hardly think it would be a game changer. It's not like people are going to flock from app stores to playing games on webpages. The big problem is that textures are all uncompressed on the GPU because Unity doesn't use mobile compatible texture formats for the WebGL platform. Until that gets sorted out, I think its better to use a native JS engine like Babylon if you need mobile web support.
     
  4. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    So all that would be needed is a WebGL build with browser/platform specific texture image sets for PC and Mobile.

    Surely that would be very easy to add?
     
  5. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    You would think, yes. It's been discussed in the WebGL forum, but I haven't seen any progress. There is also a bunch of boat in Unity in general, but much of that can stripped out in the package manager. A basic project with no physics, animation, ect should load fast-ish, even on mobile. The problem I usually see on mobile is people trying to load a bunch of large textures and levels which isn't a good idea for mobile by itself, more so if those textures are going to end up uncompressed because mobile hardware doesn't understand dxt. Also, Apple has been willfully negligent in adding support for WebGL 2.0, which may further limit you.
     
  6. Steven_Damian

    Steven_Damian

    Joined:
    Mar 1, 2021
    Posts:
    65
    Okay. So to sum up, if the loading times get smaller with webgl and the mobile support becomes better, do you guys see a new era of opportunities forming ?
     
  7. jencleary

    jencleary

    Joined:
    Oct 4, 2018
    Posts:
    4
    I think if WebGL ran on phone browsers it would certainly be a miracle for me. My game is a fun friends and family football pickem' app and it was rejected by Apple last NFL season because it was 'simulated gambling' - even though no money was involved I couldn't get it through testflight. Currently I have no way for my players to put their picks in on an iphone or ipad, which most of them have. They have to either get an android device or find a computer tower or laptop to make their weekly picks on my webGL version. I don't have a very high opinion of Apple right now, seems like there are plenty of big name developers that make real gambling apps - yet they will say 'no' to me because I'm an indy developer. I don't live close enough to many of my family to download it on to their phones...which I could do if I was near them, but I am not...plus covid. I was hoping to use Unity Tiny but it doesn't seem to be supported...and I would need the UnityWebRequest to handle all my PHP and SQL database which wasn't in Unity Tiny the first time I looked at it. Still would like to use Unity, but am at a crossroads.
     
    Last edited: Mar 30, 2021
  8. Jorgs

    Jorgs

    Joined:
    May 3, 2014
    Posts:
    1
    Mobile support would be fantastic and a game changer in my eyes. I work with e-learning and would like to include 3d for learning, it's not feasible to run through an app as this would be modules as part of web based courses.
     
  9. agustinaugurusa

    agustinaugurusa

    Joined:
    Jan 11, 2020
    Posts:
    1
    Is there any alternative to play in a web with mobile?
     
  10. programmer119

    programmer119

    Joined:
    Sep 27, 2021
    Posts:
    94