Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2020.3.40f1
2021.3.11f1
2022.1.19f1
2022.2.0b10
2023.1.0a13
Issue ID
UUM-17066
Regression
No
IL2CPP Build fails when UniTask variable is declared in the struct
Reproduction steps:
- Open the attached project (“IL2CPPUniTaskBug.zip“)
- Select Scene Assets/Scenes/SampleScene
- Build Project File>Build And Run
Expected results: Build completes
Actual results: Build fails
Reproducible with: 2020.3.40f1, 2021.3.11f1, 2022.1.19f1, 2022.2.0b10, 2023.1.0a13
Reproduced on: Windows 11
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- 2D Freeform Light shadows disappear when light center is offset from shape bounds
- Crash on MarkAllDependencies when opening scenes with Assets from the YarnSpinner package
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
Resolution Note:
This is a limitation of il2cpp (.Net Framework and CoreCLR). At code generation time and at runtime il2cpp processes instance and static fields at the same time. Your case creates a circular dependency between `Result` and the inflated `UniTask<Result>`.
We do not plan to fix this in il2cpp as CoreCLR also does not handle this case and we are in the process of adding CoreCLR support to the Unity Player.
If Microsoft decides to fix this issue we will re-evaluate the bug for il2cpp.
https://github.com/dotnet/runtime/issues/5479
Resolution Note (2023.1.X):
This is a limitation of il2cpp (.Net Framework and CoreCLR). At code generation time and at runtime il2cpp processes instance and static fields at the same time. Your case creates a circular dependency between `Result` and the inflated `UniTask<Result>`.
We do not plan to fix this in il2cpp as CoreCLR also does not handle this case and we are in the process of adding CoreCLR support to the Unity Player.
If Microsoft decides to fix this issue we will re-evaluate the bug for il2cpp.
https://github.com/dotnet/runtime/issues/5479