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
- "Rendering Debugger" displays incorrect overdraw count when using "Unlit/Texture" shader
- Scene and Game views break when the Editor window is snapped with the Microsoft PowerToys
- Materials do not transfer texture when the "Shader" parameter is changed from "Unlit/Texture" to "Universal Render Pipeline/Unlit"
- [Linux][Vulkan] Crash when opening searchable dialog
- The "Shader error in 'AE/Leaves': "Undefined punctual shadow filter algorithm"" error appears when build completes on a specific project
Resolution Note:
The issue could not be reproduced with version 2022.3.16f1, 2023.2.4f1 and 2023.3.0b4 using the provided steps.