Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

WebGL 2.0 and URP

Discussion in 'WebGL' started by nathanjams, May 18, 2021.

  1. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Looked through the forums but I can't find anything concrete.

    Does WebGL 2.0 work with UPR?

    Seems that 1.0 does, possibly?

    Can anyone please share any links or info they have. Kind of stuck atm the moment with my builds bot running. They're building but not running in browsers.

    Thanks in advance
    Nathan
     
    OceanX000 likes this.
  2. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    1,057
    I currently use 2021.2.0a17 with URP 12, WebGL 2.0 works for me on Windows 10 in Chrome, Edge and Firefox.
     
  3. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Thanks @polemical
    I'm using 2020.3.8 with URP10

    I thought I had tried it and had it working with the same setup but I can't get my builds to work. I searched and the first few things I got were that only WebGL 1.0 is compatable with URP. But hopefully I'm just wrong about this and it is something else that is keeping my builds from playing.

    Tried with Edge, Firefox and Chrome. Same result if I run locally or host on AWS

    Nathan
     
  4. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    1,057
    You'll need to see what the errors are before anyone can be much help - the first thing to work out is exactly why your builds aren't playing, then if you can't solve it from that, at least you'll have more info to help others help you.
    https://forum.unity.com/threads/i-g...laying-my-game-in-webgl.1083545/#post-6983225
    Also, if you haven't seen these pages already..
    Debugging and troubleshooting WebGL builds: https://docs.unity3d.com/Manual/webgl-debugging.html
    Building and running a WebGL project: https://docs.unity3d.com/Manual/webgl-building.html
     
  5. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Cool, Thanks. I'll check those out in the morning. The builds start to load in the browser but get stuck around 4/5ths of the way and the loading bar just freezes and that's it.

    Yeah, no errors but like 2 hours build times.

    Once i get it I'll post whatever it was.

    Thanks again.
     
    polemical likes this.
  6. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    So my issue was something completely non-Unity related.

    I had been uploading my builds to the same bucket on AWS S3. I thought that simply deleting previous builds would be enough but the Cache was causing issues. Invalidating the cache allows newest files to be run.

    Everything seems to be working Unity wise.

    Thanks again for your help @polemical
     
    polemical likes this.
  7. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    WebGL 1 will run into serious issues with URP. That is unfortunately just due to the age and limitation of WebGL 1. We wish that Apple would soon adopt the now 4.5 years old WebGL 2 technology.

    WebGL 2 works with URP. Keep an eye out for Unity 2021.2 Beta when it arrives, we are hoping to land performance improvements to WebGL URP support in there.
     
    Last edited: May 27, 2021
    nathanjams and polemical like this.
  8. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Thanks @jukka_j

    Out of curiousity, are you aware of any possible changes to the audio API that would allow for voice chat in WebGL (assets like Photon Voice or Dissonance audio)?

    Thanks in advance,
    Nathan
     
  9. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    I have unfortunately not looked into those audio plugins in detail. Such inquiries should definitely go towards the respective developer teams of these plugins, maybe they might have a WebGL version in the works already?
     
  10. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Thanks @jukka_j

    It was actually the response from one of those developers that promted me to ask you, Michael from Crazy Minnow (Salsa) wrote this when asking about WebGL audio:

    "This is not something we plan to implement. The issue on WebGL is that it's the only Unity platform that is using a completely different audio framework, a non-feature complete wrapper for Web Audio API. Although Web Audio API is rather feature rich, much of it was not implemented in Unity's wrapper. Additionally, audio processing is not closely related to microphone handling in Web Audio API."

    https://forum.unity.com/threads/amplitude-for-webgl.507835/page-2#post-7169140

    From what I've been reading on the forums you have your hands full and I'm guessing any development in this regard is a low priority.

    Thanks as always,
    Nathan
     
  11. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    Thanks for the report. The issue is not this, but the issue is that developers are not reporting the bugs they are seeing to us. We are not currently tracking any active bugs in our audio backend implementation, the last ones we had I fixed in October last year. I am also not aware of critical items having gone wontfixed on this area. (Wontfixing could certainly happen, since Web Audio API does have quite a lot of limitations compared to native audio APIs) Though the post there suggests that the author has the impression that the root cause would not be a limitation of Web Audio API, but an unreported limitation of Unity.

    If so, we'd love to get actual bug reports about what is not working. Otherwise we have a hard time of knowing about the issues.

    It could be the case that the feature will end up being a WontFix if it is a hard limitation of Web Audio API, but at least we will then have an explicit record of this limitation, and more fuel to the conversations that we have with the Web Audio API spec board to whom we regularly complain about web not being up to par with native platforms.
     
    nathanjams likes this.
  12. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    215
    Thanks @jukka_j

    I'm honestly surprised you hadn't heard from the Crazy Minnor team regarding these limitations. Like you said above, hopefully at least some resoluion will come from this dialogue and we can move beyond speculation.

    Nathan
     
unityunity