Search Issue Tracker

Won't Fix

Votes

1

Found in [Package]

9.0.0, 8.0.1

Issue ID

1241097

Regression

No

[URP] RenderPassFeature object does not delete in ForwardRenderdata if CustomRenderPassFeature script gets deleted

Package: Scriptable Render Pipeline Universal

-

-ArgumentNullException errors are thrown continuously if any other script assigned to RenderFeature from the asset selector. (Refer a video)
-RenderPassFeature object can not be deleted in ForwardRenderdata if CustomRenderPassFeature script gets deleted.

Steps to repro:
1. Open the attached project.
2. Select CustomForwardRendererData object.
3. Click on "Add Renderer Feature" tab > "Custom Render Pass Feature".
4. Delete "CustomRenderPassFeature" script in Project window.
5. Step 2 > Remove Missing RenderFeature object in the Inspector.

Actual Result:
RenderPassFeature object does not delete.

Expected Result:
RenderPassFeature object deletes on removing from the Inspector.

Reproducible in:
2020.2.0a9, 2020.1.0b8, 2019.3.0f3 with Package version 9.0.0, 8.0.1, 7.3.1, 7.2.0, 7.1.8, 7.1.7.

Environment:
Occurring on Windows 10 & Mac 10.15.

Stack trace:
ArgumentNullException: Value cannot be null.
Parameter name: componentOrGameObject
UnityEditor.PrefabUtility.GetCorrespondingConnectedObjectFromSource[TObject] (TObject componentOrGameObject) (at <5951c2421c324f47883bd5ba8a4bf507>:0)
UnityEditor.InspectorWindowUtils.DrawAddedComponentBackground (UnityEngine.Rect position, UnityEngine.Object[] targets, System.Single adjust) (at <5951c2421c324f47883bd5ba8a4bf507>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <5951c2421c324f47883bd5ba8a4bf507>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

  1. Resolution Note:

    The proper fix for this bug is to move away from subassets and implement polymorphic serialization. The way it is implemented now as sub-assets makes it difficult to remove properly. The correct way is to go with polymorphic serialization.

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.