Steps to reproduce:
- Open any Project
- In the Hierarchy create a "PanelRenderer" GO
- Drag it into the Asset Folder in the Project Browser to create a Prefab
- Enter any Prefab View from the Hierarchy of said PanelRenderer
- Enter Play Mode
- In the Project Browser create a UI Document UXML and drag it into the PanelRenderer's Panel Renderer Component's Source Asset
- Exit Prefab View and Save when prompted
OR
- In the Hierarchy create a "PanelRenderer" GO
- Delete it in the Hierarchy
- Repeat step 1
- Focus Inspector
- Repeat step 2
Actual results: Error logged: "MissingReferenceException: The object of type 'UnityEngine.UIElements.PanelRenderer' 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+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at <47ff79cae51e4af28a49c9d0f4886fc3>:0)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at <47ff79cae51e4af28a49c9d0f4886fc3>:0)
UnityEngine.UIElements.PanelRenderer.get_nativeParentUI () (at <808d036c6d1b47faae52a5deeb8807da>:0)"
Expected results: No Errors are logged
Reproducible with versions: 6000.5.0a4, 6000.5.0a6
Can’t test with versions: 6000.0.67f1, 6000.3.7f1, 6000.4.0b7, 6000.5.0a3 (No Panel Renderer Component feature)
Tested on (OS): Windows 11
Note: Issue does not reproduce with the UIDocument Component