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

Resolved 2022.1.0a16, 0b1, 0b2 URP WebGL is broken - FIXED in 0b3

Discussion in '2022.1 Beta' started by adamgolden, Nov 29, 2021.

  1. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    As of 0a16, WebGL projects now crash on startup in the browser after displaying the official splash. Tested on Windows 10 with Chrome, Edge and Firefox. I've only tested with URP since that's what I use.

    "[.WebGL-000009740D3D8E00] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small."
    2022_1_0a16_URP_WebGL_issue.jpg

    Edit: Firefox also displays this, which could be related: "WebGL warning: drawElementsInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE."

    Edit: Removed my link to a live build of the issue which I had included in this comment (as the issue has since been resolved). The attached image shows what was wrong and there's no longer any point to hosting a demo of it.
     
    Last edited: Aug 3, 2023
    ROBYER1 and coldpizzapunk like this.
  2. coldpizzapunk

    coldpizzapunk

    Joined:
    Aug 20, 2014
    Posts:
    30
    I am having the same WebGL issue when upgrading to 2022.1.0a16 using URP also.
     
    adamgolden likes this.
  3. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    434
    We're working on getting these URP issues resolved for WebGL as soon as possible.
     
    coldpizzapunk and adamgolden like this.
  4. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    434
    I have a fix. Getting it merged as fast as the process will let me.
     
  5. coldpizzapunk

    coldpizzapunk

    Joined:
    Aug 20, 2014
    Posts:
    30
    Did this make it into the 2022.1.0b1? I am still having an issue, wondering if I needed to do anything else.
     
    DrViJ likes this.
  6. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    It's the same for me in 0b1 - though I didn't test the URP template this time. I've upgraded through pretty much every latest alpha and beta since 2019.something, so generally if my project doesn't work it's the same in the template.

    For anyone stumbling on this thread looking to try 2022, the latest version where URP works with WebGL is 2022.1.0a15 - but most of the time you have to do a "Clean Build" or it will crash over a different issue. An alternative approach to get 0a15 builds working is to delete the Library/BuildCache and Library/Bee folders before each build.
     
    coldpizzapunk likes this.
  7. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    2022.1.0b2 :(
     
    coldpizzapunk likes this.
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Parts of the fix on the Editor side are in landing pattern for b3. There are other parts on the URP side that still have to be brought to 2022.1 via the next graphics vendoring update.
     
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Rough ETA?
     
    JPUlisses and coldpizzapunk like this.
  10. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    From 2022.1.0b3 Release Notes: "WebGL: Fixed errors rendering URP scenes with WebGL. (1385451)"

    Confirmed - I have built and run my project in Chrome, Firefox and Edge! High fives all around, well done :D