Search Issue Tracker
By Design
Votes
0
Found in
2022.3.62f1
6000.0.54f1
6000.1.12f1
6000.2.0b10
6000.3.0a2
Issue ID
UUM-112103
Regression
No
Async method in Play Mode being aborted when calling `new System.Windows.Forms.Form`
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/Issue.unity” Scene
3. Enter the Play Mode
4. Observe Console logging "Beacon {count}" for every second
5. In Hierarchy, select “Test Async“
6. In Inspector, right-click the “Test Async (Script)“ and select TestOpenForm
7. Observe the Console
Expected result: "Beacon {count}" continues logging
Actual result: "Beacon {count}" stops
Reproducible with: 2022.3.62f1, 6000.0.54f1, 6000.1.12f1, 6000.2.0b10, 6000.3.0a2
Reproducible on:
Play Mode
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
The issue where asynchronous methods appear to stop executing after opening a System.Windows.Forms window in the Unity Editor is not a bug, but expected behavior caused by a synchronization context conflict. Unity uses a custom UnitySynchronizationContext to ensure async continuations run on the main thread. When a Windows Forms window is shown (e.g., via Form.Show()), it installs its own message loop and synchronization context, which can override Unity's. This prevents Unity from processing async continuations, causing them to appear frozen. https://discussions.unity.com/t/winforms-in-unity/668840/6