Search Issue Tracker
Won't Fix
Won't Fix in 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
- Asset thumbnails in the Project window stay white when a referenced texture file is deleted and restored
- Crash on PersistentManager::ReadObjectThreaded when calling AssetDatabase.ForceReserializeAssets() multiple times in a row
- Scene becomes dirty when first opening an HDRP Template project
- Ping highlight text is misaligned with asset name when pinging a prefab from Prefab Mode to Project window
- Crash on CheckDeviceStatus when selecting GameObjects in the scene view while using DX12
Resolution Note:
The issue could not be reproduced with version 2022.3.16f1, 2023.2.4f1 and 2023.3.0b4 using the provided steps.
Resolution Note (2023.3.X):
The issue could not be reproduced with version 2022.3.16f1, 2023.2.4f1 and 2023.3.0b4 using the provided steps.