Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4.0f1
2019.2.0a1
2019.3.0a1
2020.1.0a1
Issue ID
1195439
Regression
No
Argument exception is thrown on drawing the next button after coming back from a task when using async/await
Steps to reproduce:
1. Create a new project
2. Attach the provided script ("Foo.cs") to any GameObject in the Scene
3. Press on the GameObject which has the script attached
4. In GameObjects Inspector press "Do time consuming stuff" Button
Expected result: No errors or exceptions are thrown
Actual result: "ArgumentException: You can only call GUI functions from inside OnGUI." exception is thrown
Reproducible with: 2018.4.13f1, 2019.2.13f1, 2019.3.0b11, 2020.1.0a13
Couldn't test with: 2017.4 due to "Feature `asynchronous functions' cannot be used because it is not part of the C# 4.0 language specification"
Notes:
- In 2019.2.0a1 the exception is thrown constantly without end
- Buttons that are drawn before the button that runs a task don't throw any exceptions when the button that runs the task is pressed
- The bug reproduces the same both in Play Mode and Edit Mode
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note (2020.1.X):
Low priority defect and unlikely to be fixed for the near future.