Search Issue Tracker
Fixed
Fixed in 6000.0.33f1, 6000.1.0a9, 7000.0.0a14
Votes
0
Found in
6000.0.31f1
6000.1.0a7
Issue ID
UUM-90739
Regression
No
ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
Reproduction steps:
1. Open the attached “IN-90535.zip” project
2. Open the “TestScene” Scene (Assets > Scenes)
3. Open the “MainDocument.uxml” in the UI Builder (Assets > UIAssets > UxmlReference)
4. Click on the “custom-element” in the Hierarchy and observe the "Template" Attribute set to “Template.uxml”
5. Double-click on the set “Template.uxml” to open it in UI Builder
6. Enter the Play mode in the “TestScene”
7. Make any edits in the “Template.uxml” (like adding an empty Visual Element)
8. Save the “Template.uxml”
9. Exit the Play mode
10. Open the “MainDocument.uxml” again
11. Observe the Console and the “Template” Attribute reference
Expected result: No errors and reference to the Template is kept
Actual result: “ArgumentException: Object of type ‘UnityEngine.Object' cannot be converted to type 'UnityEngine.UIElements.VisualTreeAsset'." error and the reference to the Template is set to 'None’
Reproducible with: 6000.0.31f1, 6000.1.0a7
Couldn’t test with: 2021.3.47f1, 2022.3.54f1 ('UxmlElementAttribute' and 'UxmlElement' could not be found errors)
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Notes:
- Reimporting the “MainDocument.uxml” appears to fix the issue as the “Template” reference is set again
- After performing all steps (Reimporting as well) and without entering the Play mode, editing and saving “Template.uxml” again and then opening “MainDocument.uxml”, makes the issue fully reappear
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Add comment