Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Official Web runtime updates are here: Take your browser to the next level

Discussion in 'Web' started by AlwaysCraven, Nov 29, 2023.

  1. AlwaysCraven

    AlwaysCraven

    Unity Technologies

    Joined:
    Jun 9, 2022
    Posts:
    10


    Hello everyone!

    Ben here, the Product Manager looking after Unity Web (yes, we are no longer called WebGL!). For those of you that attended our talk at Unite, it was lovely meeting you and discussing your projects! For those that weren't able to make it, we've just posted a new blog covering some of the new features you can use now, as well as things coming soon to Unity Web.

    Read through the blog post here: https://blog.unity.com/engine-platform/web-runtime-updates-enhance-browser-experience

    Have questions about any of the topics discussed in the blog? Post them here! General thoughts about the future of Unity Web? Let them rip! We'd love to hear from you.

    Thanks!
     
    yuliyF, APSchmidt, Armynator and 7 others like this.
  2. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    449
    Thanks! Can this be pinned? Also, do you mind if we tag you for questions about the roadmap or list of features for each LTS (like it was done in the past?)
     
  3. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,200
    Very fascinating. Are there anywhere I could test this new web platform on unity 6 now?
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Did anyone think to test the blog post page on Firefox?
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,510
    btw.
    that blog link goes through some google redirect,
    and maybe not good idea to run 3 webgl builds at the same time? (on that blog post page)
    and loud music automatically plays, bad if had headphones on with high volume..
     
    De-Panther likes this.
  6. InnevaPharma

    InnevaPharma

    Joined:
    Jun 6, 2016
    Posts:
    1
    Great news! But I have some doubts...

    In our company, we develop 3D viewers and other applications for multiple clients, and there is an increasing demand for these to be accessible via the Web, without the need to download and install apps through the stores, yet always ensuring compatibility with mobile devices.

    I find Unity to be an excellent development engine, but its WebGL versions have always been problematic, with multiple errors depending on the project. While on other platforms, when we encounter bugs, we search for solutions and fix them, and they work, in WebGL, it seems more random. For example, clicking a button might work once, but not when you try a second time, and you might encounter various types of errors...

    It has become crucial for us to be able to perform WebGL compilations, being confident that they will work (at least on decent devices, but nowadays many compilations fail despite being on the latest Apple or Android devices).

    - Does this mean that you will provide stable support for WebGL in Unity 6 builds? Will it properly implement, for instance, the previous issues where the TextMeshPro input field does not open the keyboard on mobile?

    While we know that Unity sometimes has very large and impactful components like "VFX Graph" and others, we think it would be more important to achieve stable WebGL versions, even if they do not allow certain components, and from there, look into implementing improvements and new components.

    Finally, I'd like to mention that we have also been following WebGPU, but we believe that being a technology still in development, it won't be functional for the masses in the short or medium term.
     
    hwk9120, sjm-tech, IOU_RAY and 2 others like this.
  7. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    My company in the same situation, I agree 100%!
     
  8. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    only issues ive had with webgl and issues was either an incompatibility with webgl, or, zonealarm, ive never had it work one click and not the next
     
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,135
    Hi. I would like official to keep optimize the web runtime to make it support low end mobile phone as much as possible that reaching same level of cocos game engine mobile platform support. One more thing is I would like official to make it support unity ecs by default that able to support entities graphics that the project created using entities graphics also can support and render properly at web runtime.
     
  10. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,287
    Hi it's not clear why mobile is now being supported apart from some minor mentions of smaller build size. Is it just the case that phones are more powerful now and so can run what they struggled to before or you have significantly changed something?
     
  11. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
  12. AlwaysCraven

    AlwaysCraven

    Unity Technologies

    Joined:
    Jun 9, 2022
    Posts:
    10
    Sorry about that! Looks like it was marked private by accident some point over the weekend. It's back up now :D
     
    adamgolden likes this.
  13. AlwaysCraven

    AlwaysCraven

    Unity Technologies

    Joined:
    Jun 9, 2022
    Posts:
    10
    Hey Andy, the WebGPU builds won't work on Firefox right now because Chrome is the only browser who has shipped WebGPU support in the production browser. Firefox is coming very soon.
     
  14. AlwaysCraven

    AlwaysCraven

    Unity Technologies

    Joined:
    Jun 9, 2022
    Posts:
    10
    Appreciate the heads up :)

    We've changed it now to be links out to the WebGPU builds instead of loading them all at once (as you would imagine, this gave mobile users issues since WebGPU is not available on mobile yet)
     
  15. Gamemakers3D

    Gamemakers3D

    Joined:
    Dec 8, 2020
    Posts:
    31
    404, but is it about WebGPU or some supported Threads in WebGL 2+ with extensions for fast backward compatibility?
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,439
    Waiting 30 seconds for boat demo to load on a gig internet after reading about load time optimization had me chuckle lightly.
     
    io-games, CocosGames and bugfinders like this.
  17. lordars

    lordars

    Joined:
    Mar 15, 2022
    Posts:
    1
    ARE YOU GOING TO MAKE AUDIO SOURCE WORK ON THE WEB?
     
  18. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    other than theres no need to shout, you probably need to be more specific.. whats wrong with audio source?
     
    Walter_Hulsebos and LilGames like this.
  19. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    575
    That announcement came with a lot of promotion of Facebook "instant games". I don't know anyone who play games on Facebook anymore. Is this actually still a thing?
     
    Last edited: Jan 17, 2024
  20. dinkelstefan

    dinkelstefan

    Joined:
    Mar 13, 2019
    Posts:
    30
    I am very happy to see these improvement to the Web platform, especially the 4GB ram support since our application loads a lot of data and fragments memory relatively quick. Also a big plus for exception support without the performance overhead.


    With Unity 6 actively supporting mobile (cross platform), it would be nice to have a build option to compress textures for multiple platforms at once, and in one build.

    This way developers don't have to choose between multiple builds (inefficient workaround) or optimizing memory for a single platform.

    @AlwaysCraven @jukka_j Is it possible for the web team to look into this option?
     
    De-Panther likes this.
  21. dlugent

    dlugent

    Joined:
    Jun 10, 2014
    Posts:
    2
    Looking for some clarification on this, I'm in the same boat as @kenshin and @InnevaPharma but my company is very locked down on IP. Are the models being downloaded up front on a mobile/web build or just streamed? This could be a potential solution to us, but if the models are downloaded locally, our solution will need to change.

    Thanks!
     
  22. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    well if you put in streamed assets, there will be streamed assets, if you dont, there wont.. you should be able to tell from the build files.
     
  23. dlugent

    dlugent

    Joined:
    Jun 10, 2014
    Posts:
    2
    Reading the documentation on this now, If I set all of the assets to Steaming, there will be no local copies? Thanks for the help.
     
  24. pegorari

    pegorari

    Joined:
    Nov 19, 2009
    Posts:
    60
    Any plans to disable default render pipeline when using URP? When export using URP the final wasm size increases +3mb
     
    De-Panther likes this.
  25. Game-Whiz

    Game-Whiz

    Joined:
    Nov 10, 2011
    Posts:
    122
    it took a couple of seconds on my side, I was really impressed with it, particularly because this example seemed to have lots of geometry and textures.

    The WebGPU example, with millions of particles, is also highly impressive.
     
  26. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    575
    Thought I'd take your bait and time it; 11 seconds load time + 2-3 seconds initialization time. 350 Mbps internet.
     
  27. AdamandEveStudios

    AdamandEveStudios

    Joined:
    Apr 19, 2022
    Posts:
    35
    What exactly are you asking? You're just making very biased complaints about an engine you clearly have no experience in. Do you just see one error in your build and give up entirely on the engine? There are zero game breaking and user experience destroying bugs in the latest webgl LTS. Any errors like your noob button example just sounds like poor development on your end.

    Any compilation failing is a result of bad development and a failure to read / research the very simple and plentiful of unity docs / forms on webgl. There is no magic AI genie that will solve all your tiny specific errors.

    The current LTS webgl is almost near bullet proof. If you have been following the unity webgl timeline you would know that the very small team working on it has gone above and beyond in almost every aspect + squashing bugs of a very demanding and ungrateful user base (clearly people like you who have zero post history and completely derail the conversation on an otherwise bountiful and HUGE blog post). Do you even know how a unity project is compiled into a webgl build? Do you know how many things like user device, targeted web browser, memory, etc. have to be taken into account? Like you genuinely couldn't spend 5 minutes researching why TMP input field doesnt work on mobile???
    https://forum.unity.com/threads/textmeshpro-input-field-new-input-system-webgl-no-work.926396/
    https://assetstore.unity.com/packages/tools/input-management/pop-input-225293

    You do not speak for the "we". You have 1 post and its negativity. I am genuinely shocked that you develop 3d viewers for your clients and know this little about the industry you work in. More VFX graph support on web is beautiful news - there is no downside to an engine being actively developed and ported over to web - it's just such a bizarre and noob comment to ask the team not to work on updating something and that it's somehow bad to implement something as huge as VFX graph. Maybe the unity team should stop everything they are doing / put a halt to all of their goals so that you can develop a website of a rotating 3D couch model. It sounds like your doing some real groundbreaking and demanding work with your "3d viewers" :rolleyes:

    The rest of us webgl folk that have used this engine for years are the "WE" and WE are optimistic and grateful that there is an active and hardworking webgl team at unity. Not to mention the other topics mentioned in blog post: faster load / download times, Meta partnership, WebGPU development + optimism, 4GB MEMORY SUPPORT (< almost made me shed a tears of joy when I saw this), new web assembly / Emscripten compiler, and of course the greatest part which is the long awaited mobile support. This is all a huge jump, let alone with the full collaboration and participation of almost every giant in the space (especially apple now finally supporting webgl 2.0 (which they had for a few months before this post) as well as embracing mobile safari support.

    All in all, this is an amazing blog post + news from the unity web team. The majority of us recognize the team's tremendous efforts and accomplishments thus far. 2024 will be a bountiful year for unity :D
     
  28. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    Does audio work these days in webgl? Last time I tried to use it (late 2020 I think?) audio just wasn’t working and the whole experience was very underwhelming.
     
  29. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    Cant say I noticed any lacking myself
     
  30. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    575
    Yes of course audio works. Since at least Unity 2018
     
  31. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    I don't believe that is true: https://issuetracker.unity3d.com/issues/audio-no-longer-plays-in-build

    I wanted to do a small webgl thing in late 2020, it definitely wasn't working at the time.

    Also, there is no "of course" when it comes to Unity and basic features working, especially for the somewhat less popular platforms.
     
    Last edited: Feb 15, 2024
  32. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Yup, was FUBAR for quite a while back then, a number of bugs basically made it useless (to the point I had to write my own solution for WebGL based on the Web Audio API at the time plus still have my projects use Unity's audio system in the editor and for other platforms).

    That said, I've played builds made by other people recently, and it seems to be okay these days.. but depending what you're doing with it, ymmv.
     
    AcidArrow likes this.
  33. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    575
    The bug says its fixed. What steps have you taken to validate if it works or does not? Which browser are you testing in? Why don't you test and see for yourself? Meanwhile, the rest of us will continue releasing functional games in WebGL while you wait... for what I don't know.

    (We use Unity 2018.4.36 for a legacy game and 2021.3.32 for our most recent. Firefox, Edge, and Chrome tested.)
     
  34. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    I was replying to you saying that audio has worked properly since 2018 with a link that shows that for several months, at least, during that period, it wasn't working.

    I do not currently have time to spend multiple days building something in webgl, only to stumble upon a major blocker (like audio not working at all), so I was attempting to ask from people that do webgl stuff more often for the current status, and @adamgolden did fill me in, but I guess you disapprove of me asking for whatever reason.
     
  35. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    issuetracker shows there have been 241 bugs with WebGL Audio. I don't see a way to filter by how many are fixed or not.. but it isn't just that 1 bug got fixed then all was well. It would be nice to see someone from Unity post here "we fixed all the audio stuff, those 241 are ancient history - good to go!" ..don't actually expect it, but I hope that's how it is :p
     
  36. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    575
    Welcome to game dev.

    EDIT: re "multiple days"
    It takes a couple hours to set up a test to see if audio works in a way you expect.
     
    Last edited: Mar 6, 2024
  37. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    Right.
     
  38. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,510
    De-Panther likes this.
  39. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    Most of it seems to be about IL2CPP being excruciatingly slow to build, while .NET8 Blazor Wasm (which I guess Unity China integrated into Unity?) is pretty fast to build and only a little bit slower at runtime.

    Doesn't matter anyway, since these are probably China only features.

    In the meantime, I'm trying to build the new URP demo project for webgl, just to have something to test what works and what doesn't and it's building for an hour now, so, fun times.
     
    Last edited: Feb 27, 2024
  40. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    China only features? .net8? huh?
     
  41. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    449
    Have you tried changing Code Optimization to "Build Times"?
     
  42. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
  43. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,052
    Wow, didnt know they had their own special version.. weird, i can understand some additional filters because i know there are some strict laws there, but not more features, id expect less.
     
  44. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,973
    Apparently, they just have different priorities.