Reproduction steps:
1. Open the attached “UIBuildContextIssue” project
2. In the UI Builder window (Window > UI Toolkit > UI Builder), observe that the “TestUXML” UI Document is open
3. Enter Play Mode
4. Observe the UI Builder window again
Expected result: The “TestUXML” is still open
Actual result: The “TestUXML” is closed or its elements are remaining, but the reference is lost
Reproducible with: 6000.0.39f1, 6000.0.43f1, 6000.1.0b11, 6000.2.0a7
Not reproducible with: 2022.3.60f1, 6000.0.38f1
Reproducible on: macOS Sequoia 15.3.1, Windows 10
Not reproducible on: No other environments tested
Notes:
- “InvalidOperationException: Collection was modified; enumeration operation may not execute.“ is logged in the Console
- Instead of step 3, you can also reimport any script to cause a domain reload