Search Issue Tracker

Active

Under Consideration for 6000.0.X, 6000.2.X, 6000.3.X, 6000.4.X

Votes

0

Found in

6000.0.54f1

6000.2.0f1

6000.3.0a4

6000.4.0a1

Issue ID

UUM-113461

Regression

No

Shader Graph Asset can be assigned to Material field in URP Renderer Feature Script and throws errors in the Console

-

Steps to reproduce:
1. Create new Unity project
2. Create URP Renderer Feature Script (Right-click in Project window > Create > Scripting > URP Renderer Feature Script)
3. Open created script
4. Add these code lines:


  1. [SerializeField]
  2. [HideInInspector]
  3. private Material renderMaterial;

5. Save script and close it
6. In Project window create Shader Graph Asset
7. Select URP Renderer Feature Script
8. In the Inspector window try selecting Shader Graph Asset in the Material field

Actual results: Errors are thrown in the Console window (on 6000.3), Shader Graph Asset is allowed to be selected in the field

Expected results: No errors are thrown in the Console, only Materials should be allowed to be selected

Reproducible with versions: 6000.0.54f1, 6000.1.15f1, 6000.2.0f1, 6000.3.0a4

Tested on (OS): macOS Silicon, Sequoia 15.5

Notes:

  •  On 6000.3.0a4, when selecting Shader Graph Asset (and sometimes when selecting a built-in Material) errors are thrown in the Console:

{code:java}
Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI
UnityEditor.RetainedMode:UpdateSchedulers () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/RetainedMode.cs:46)
{code}

{code:java}
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_toolbar () (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/EditorStyles.cs:196)
UnityEditor.ObjectListArea+Group..ctor (UnityEditor.ObjectListArea owner, System.String groupTitle) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ObjectListGroup.cs:12)
UnityEditor.ObjectListArea+LocalGroup..ctor (UnityEditor.ObjectListArea owner, System.String groupTitle, System.Boolean showNone) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ObjectListLocalGroup.cs:85)
UnityEditor.ObjectListArea..ctor (UnityEditor.ObjectListAreaState state, UnityEditor.EditorWindow owner, System.Boolean showNoneItem) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ObjectListArea.cs:157)
UnityEditor.ObjectSelector.InitIfNeeded () (at /Users/bokken/build/output/unity/unity/Editor/Mono/ObjectSelector.cs:730)
UnityEditor.ObjectSelector.CreateGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/ObjectSelector.cs:1027)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1e17d9e30a42433c9e50f8dea8f7ce8b>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1e17d9e30a42433c9e50f8dea8f7ce8b>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1e17d9e30a42433c9e50f8dea8f7ce8b>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.Invoke (System.String methodName) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/WindowBackends/DefaultEditorWindowBackend.cs:383)
UnityEditor.RetainedMode:UpdateSchedulers() (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/RetainedMode.cs:46)

{code}

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.