Search Issue Tracker
Won't Fix
Under Consideration for 2022.3.X, 2023.2.X, 2023.3.X
Votes
0
Found in
2022.2.5f1
2023.1.0b3
2023.2.0a1
2023.3.0a3
Issue ID
UUM-27147
Regression
Yes
[UI Toolkit] Continuous MissingReferenceException after deleting UXML file
Repro:
- Create a new project.
- Create UI Document in Hierarchy. (GameObject -> UI Toolkit -> UI Document)
- Import attached UXML file.
- Attach imported UXML to UI document's 'Source Asset' field.
- Delete the imported UXML file in project view.
- Delete the UI document in hierarchy.
Expected Outcome: Errors stop filling up the console.
Actual Outcome: Errors reach 999+ within seconds after clearing the console.
Reproducible in 2022.2.5f1, tested on Windows 10.
Could not reproduce with UI Toolkit 1.0.0-preview.18 and 2020.3.41f1.
Have not extensively regression tested the issue - please contact the assigned ticket reporter if you need further testing or information.
Error Message:
GIF of console errors attached to ticket.
{code:java}
MissingReferenceException: The object of type 'VisualTreeAsset' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.get_name () (at <f45a99ffbb9f4d0580258c77e560b3ab>:0)
UnityEngine.UIElements.VisualTreeAsset.Instantiate () (at <91595155ebb442339abb5402bb548a5e>:0)
UnityEditor.UIElements.VisualTreeAssetEditor.UpdatePreviewTexture (System.Int32 width, System.Int32 height) (at <6ac5e7e1619a4ba7b29c228ba4ede87d>:0)
UnityEditor.UIElements.VisualTreeAssetEditor.Update () (at <6ac5e7e1619a4ba7b29c228ba4ede87d>:0)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <00d63564201b48698d51680c10078897>:0)
{code}
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
- “Open” button in Inspector does not function for certain Assets
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
Resolution Note:
The issue could not be reproduced with version 2022.3.16f1, 2023.2.4f1 and 2023.3.0b4 using the provided steps.