-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGL build fails with this package installed #6
Comments
@StephenHodgson |
Really? Bc I ran into the same exact build error, and needed fixing for one of my other popular packages. |
@StephenHodgson
... done, error goes away and the build is now flawless ? Does the order of those 2 steps matter ? |
You only need Utilities.Async from OpenUPM. WebGL thread patcher is already part of my package as post build step. |
@StephenHodgson But the exact same line of code finished correctly on older unity version with original WebGL Threading Patcher. I had to switch to more recent version because of other WebGL stuff support unfortunatelly. |
Sounds like those are blocking calls.
Sure but keep in mind, according to the Unity engineer, the call stacks have always been misaligned and broken. Which was causing some other undefined behavior. So I guess pick your poison. |
@StephenHodgson |
Hi there @StephenHodgson ! I've tried this awesome repo with your fix (importing Utilities.Async (2.2.1) from OpenUPM) in Unity 6 and I'm getting the same error as OP referenced. Windows machine, WebGL build. Can't build due to: UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () Have you been able to confirm the fix works in your machine for Unity 6? Thank you! |
I have not seen any issues so far. I have build automation and unit tests that run every week to confirm [edit] |
Weird, 20 minutes ago when I was checking the smoke tests Unity 6 was also showing as failing on the WebGL-Test step, now it's showing fine. Oh well, thank you very much for checking, and so quick! Very clever to have those automatic tests :) I can't imagine what step I would be doing wrong however, I'm only adding the ThreadingPatcher folder in my Assets folder and then adding the Utilities.Async package, building an empty scene. uhm Any ideas at all of something obvious I might be doing wrong? I will check tomorrow on other versions of Unity on my machine just for sanity. If I'm setting it up wrong it should fail me in those too I would guess. Thank you! |
@Xantomen |
yeah with Unity 6 the Awaitables have much better support. |
Wow I'm a big dummy, it had completely skipped my understanding when reading your texts above that you were not meant to use both WebGLThreadingPatcher and Utilities.Async together, just the second one. I feel silly now hahaha. Thanks guys! The second package alone works very well for what I needed. I'll spread the word. |
Hi,
I have unity 2023.2.9f1 and when I install WebGLThreading Patcher my WebGL build fails with the following error:
IL2CPP error for method 'System.Void System.Threading.<>_GenericWrapper::.ctor(System.Action1)' in assembly '[projectpath]\Library\Bee\artifacts\WebGL\ManagedStripped\mscorlib.dll
System.InvalidOperationException: Attempting to return from void method 'System.Void System.Threading.<>_GenericWrapper::.ctor(System.Action1)' when there are values on the stack. Is this invalid IL code
Any ideas how to fix that ?
The text was updated successfully, but these errors were encountered: