UI Toolkit WebGPU browser errors (6.2 beta)

UI Toolkit in WebGPU builds is giving me random errors and rendering issues in browser. Seems to happen more with VisualElements containing 3 or more buttons. Using 6000.2.0b4. No issue in editor, just in the builds in browser.

Submitted isolated project: Case IN-104129

Refreshed page gives different errors, and sometimes no issue. A race condition?

Oof, that doesn’t look good. Haven’t seen this one yet. Thanks for filing a ticket.

Hi!

Just for context: Have you also enabled multithreading in your build?

Do you mean in Publishing Settings?

I get errors with and without it enabled. However, the error without multithreading is consistently RuntimeError: divide by zero while with multithreading the errors are random.

Yes, exactly that setting :). Ok there seems to be a general bug in UI Toolkit then if it also happens when this setting is disabled.

Sorry, that divide by zero error was an issue on my script. I just retried on a new project and I’m only getting errors on Multithreading enabled. No issue with it disabled.

Hi, any guess/estimate on a fix? This is a blocker for testing our web performance, so if it’s going to be a while then we’d prefer rebuilding our ui with uGUI over losing multithreading.

Issue tracker: https://issuetracker.unity3d.com/issues/argumentoutofrangeexception-and-uitk-is-rendered-incorrectly-when-building-in-webgl-with-native-c-slash-c-plus-plus-multithreading-enabled

Hi,
sorry for the late response but I just wanted to notify you that this bug is now fixed in all supported Unity versions:

So there should be no more issues with UI Toolkit and the Native Multithreading player setting.