Search Issue Tracker

Active

Under Consideration for 6000.5.X

Votes

0

Found in

6000.5.0a6

Issue ID

UUM-133717

Regression

No

MissingReferenceException is thrown when exiting Prefab View of a Panel Renderer after setting Source Asset in Play Mode

UI Toolkit Graphics

-

Steps to reproduce:

  1. Open any Project
  2. In the Hierarchy create a "PanelRenderer" GO
  3. Drag it into the Asset Folder in the Project Browser to create a Prefab
  4. Enter any Prefab View from the Hierarchy of said PanelRenderer
  5. Enter Play Mode
  6. In the Project Browser create a UI Document UXML and drag it into the PanelRenderer's Panel Renderer Component's Source Asset
  7. Exit Prefab View and Save when prompted

OR

  1. In the Hierarchy create a "PanelRenderer" GO
  2. Delete it in the Hierarchy
  3. Repeat step 1
  4. Focus Inspector
  5. 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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.