Search Issue Tracker
By Design
Votes
0
Found in
2019.2.13f1
2019.3
2020.1
2020.1.0a5
Issue ID
1201463
Regression
No
"-quit" CMD argument is not waiting for async operations from Methods with the return type "Task" in batch mode
Reproduction steps:
1. Run the "AsyncExecute2020.zip" project with these command-line arguments: "-batchmode -executeMethod "Builder.Build" -logFile -projectPath -quit"
2. Open the log
3. Note that "Before" is logged
4. Open "Builder.cs" script
5. Comment "Task Build()"
6. Uncomment "void Build()"
7. Run the "AsyncExecute2020.zip" project with these command-line arguments: "-batchmode -executeMethod "Builder.Build" -logFile -projectPath -quit"
8. Open the log
9. Note that "Before" and "After" is logged
Expected Result: "-quit" CMD argument waits for async operations from Methods with all types in batch mode
Actual Result: "-quit" CMD argument is not waiting for async operations from Methods with the return type "Task" in batch mode
Reproduced with: 2020.1.0a15, 2019.3.0f1, 2019.2.14f1, 2019.2.13f1
Did not reproduce on(Feature not yet implemented): 2019.2.12f1, 2019.2.10f1, 2019.2.0f1, 2019.2.0a1, 2019.1.14f1, 2018.4.13f1, 2017.4.35f1
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
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
- VFX Graph link contrasts fail WCAG guidelines
Resolution Note (2020.1.X):
-executeMethod does not support methods with a return type other than void and 0 argument and this also applies to async methods. This hasn't been enforced with an error, but we have added this now.
To use a async method that returns a Task with -executeMethod, you can use call a async void method that calls into the Task.
public static async Task AsyncTaskBuild()
{
// code
}
public static async void Build()
{
await AsyncTaskBuild();
}