Search Issue Tracker

By Design

By Design in 6000.6.X

Votes

0

Found in

6000.3.15f1

6000.4.7f1

6000.5.0b8

6000.6.0a5

Issue ID

UUM-142007

Regression

Yes

Mesh Renderer Component uses default editor when applying custom editor

IMGUI Framework

-

How to reproduce:

  1. Open attached “IN-142268_MeshRenderer_CustomEditorIssueInURP_bug” project
  2. Open “SampleScene”
  3. Select “MeshRenderer-Issue” GameObject
  4. Inspect “Mesh Renderer” Component

Actual result: “Mesh Renderer” Component has default editor
Expected result: “Mesh Renderer” Component has custom editor

Reproducible with: 6000.3.0a5 (f9a1fab5607a), 6000.3.15f1, 6000.4.7f1, 6000.5.0b8, 6000.6.0a5
Not reproducible with: 6000.0.75f1, 6000.3.0a4

Reproducible on: Windows 10 (User), Windows 11

Workaround:

  1. Open “MeshEditor2DURP.cs” script (Packages > Universal Render Pipeline > Editor > 2D > Overrides)
  2. Change “[CustomEditor(typeof(MeshRenderer))]” with “[CustomEditor(typeof(MeshRenderer), isFallback = true)]”
  1. Resolution Note:

    Hi,

    Thanks for your bug report regarding URPRenderer2DMeshEditor taking precedence over your custom editor.

    This behavior is actually by design. The issue is not related to the isFallback property, but rather to the SupportedOnRenderPipeline attribute.

    Internally, we prioritize user custom editors over our own internal editors. However, when an editor has a targeted SupportedOnRenderPipeline attribute, it gains higher precedence than one without it. In this case, the URP editor is winning over your custom editor for that reason.

    To ensure your editor takes precedence, you should add the same attribute to your custom editor: [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]

    Once applied, your editor will also have the higher precedence and should override the URP editor as expected.

  2. Resolution Note (6000.6.X):

    Hi,

    Thanks for your bug report regarding URPRenderer2DMeshEditor taking precedence over your custom editor.

    This behavior is actually by design. The issue is not related to the isFallback property, but rather to the SupportedOnRenderPipeline attribute.

    Internally, we prioritize user custom editors over our own internal editors. However, when an editor has a targeted SupportedOnRenderPipeline attribute, it gains higher precedence than one without it. In this case, the URP editor is winning over your custom editor for that reason.

    To ensure your editor takes precedence, you should add the same attribute to your custom editor: [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]

    Once applied, your editor will also have the higher precedence and should override the URP editor as expected.

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.