Search Issue Tracker
Duplicate
Votes
28
Found in [Package]
12.0.0, 11.0.0.
Issue ID
1318882
Regression
Yes
[Shader Graph] NullReferenceException error thrown on selecting any property in Blackboard window in Subgraph Shader Graph
-ArgumentNullException error is thrown on deleting property from the Blackboard window.
-NullReferenceException error thrown on selecting any property in Blackboard window in Subgraph Shader Graph.
Steps to repro:
1. Create a new HDRP template project.
2. Project > Click on "+" > Shader > SubGraph.
3. Open SubGraph > Blackboard > Click on "+" > Vector2.
4. Select Vector2 property.
Actual Result:
NullReferenceException error thrown in the console.
Expected Result:
No error in the console.
Reproducible in:
2021.2.0a7, 2021.1.0b10, 2021.1.0a10 with Package version 12.0.0, 11.0.0.
Working Fine in:
2021.1.a9, 2020.2.7f1 with Package version 10.3.2, 10.3.1.
2021.1.17f1 with Package version 9.0.0-preview.71.
2019.4.21f with Package version 7.5.3.
Environment:
Occurring on Windows 10 & Mac 10.15.
Stack trace:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ShaderGraph.Drawing.Inspector.PropertyDrawers.ShaderInputPropertyDrawer.UpdateEnableState () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs:142)
UnityEditor.ShaderGraph.Drawing.Inspector.PropertyDrawers.ShaderInputPropertyDrawer.DrawProperty (System.Reflection.PropertyInfo propertyInfo, System.Object actualObject, UnityEditor.ShaderGraph.Drawing.InspectableAttribute attribute) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs:108)
UnityEditor.ShaderGraph.Drawing.Inspector.InspectorUtils.GatherInspectorContent (System.Collections.Generic.List`1[T] propertyDrawerList, UnityEngine.UIElements.VisualElement outputVisualElement, UnityEditor.ShaderGraph.Drawing.IInspectable inspectable, System.Action propertyChangeCallback, UnityEditor.ShaderGraph.Drawing.IPropertyDrawer propertyDrawerToUse) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:195)
UnityEditor.ShaderGraph.Drawing.Inspector.InspectorView.DrawInspectable (UnityEngine.UIElements.VisualElement outputVisualElement, UnityEditor.ShaderGraph.Drawing.IInspectable inspectable, UnityEditor.ShaderGraph.Drawing.IPropertyDrawer propertyDrawerToUse) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:140)
UnityEditor.ShaderGraph.Drawing.Inspector.InspectorView.Update () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Inspector/InspectorView.cs:126)
UnityEditor.ShaderGraph.Drawing.GraphEditorView.HandleGraphChanges (System.Boolean wasUndoRedoPerformed) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/GraphEditorView.cs:654)
UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.Update () (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/MaterialGraphEditWindow.cs:330)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
ArgumentNullException: Value cannot be null.
Parameter name: identifier
UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at <c2e9ddac9be94c64888ec1c467657510>:0)
UnityEditor.Graphing.GraphObject.RegisterCompleteObjectUndo (System.String actionName) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Data/Implementation/GraphObject.cs:54)
UnityEditor.ShaderGraph.Drawing.MaterialGraphView.DeleteSelectionImplementation (System.String operationName, UnityEditor.Experimental.GraphView.GraphView+AskUser askUser) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:891)
UnityEditor.ShaderGraph.Drawing.MaterialGraphView+<>c__DisplayClass38_0.<BuildContextualMenu>b__5 (UnityEngine.UIElements.DropdownMenuAction e) (at Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/Drawing/Views/MaterialGraphView.cs:343)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at <1c96b7a3f7794c85b453037183b01ec4>:0)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass1_0.<PrepareMenu>b__0 () (at <cfee44c50c74452d92e0643773711d9d>:0)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <c2e9ddac9be94c64888ec1c467657510>:0)
-
Resolution Note:
Bug never reproduced in 21.2 as far as I can tell (did not repro in a7 or a6), making this case a duplicate of case 1328377, which was fixed in 2021.1.7f1 (11.0.0)
-
ChristianTeister
Aug 30, 2024 11:09
This is not resolved in Unity 2022.3.43f1, HDRP 14.0.11, Shader Graph 14.0.11.
After updating from Unity 2021 to Unity 2022 we are unable to edit one of our shader graphs. -
rhiggins5173
Aug 09, 2024 07:27
Still having problems but I was able to create the property with the Graphs window
-
rhiggins5173
Aug 09, 2024 06:25
Yup I have it here still too. 2022.3.12f1
-
Bxrnenbaum
Jun 09, 2024 11:01
i still have this issue in an urp project in unity 2022.3.20f1, a lts version and this issue is definitly not resolved. i cant convert my nodes to a new sub graph at all.
-
FunkMachine
Mar 23, 2023 15:56
I was having this same issue but found a work around which doesn't make a lot of sense. But it worked for me, and now the issue is magically gone. Manually close the shadergraph tab before you run your scene. The error stopped for me. I had it crop up once more when I had it open again, but did the same thing. Now it is not happening at all.
Something strange going on under the hood, which is why some do not have the issue and others do. I was able to keep working though with this option above, hope it helps the rest of you.
-
Llockham-Industries
Jun 18, 2022 08:00
Just got this in 2022.1.4f1. Definitely not resolved.
-
crimsonbinome22
May 14, 2021 01:12
Having this issue on URP 2021.1.4, Shadergraph 11.0.0 here. I cannot edit existing shader graphs or create new ones at all. How is this not higher priority, and how come there's no plan to apply the fix before 12.0.0?
-
xadrados
May 10, 2021 10:22
We need an emergency hot fix
-
ZackPetropoulakis
May 02, 2021 23:16
Still no conclusion? This problem seems to have no workaround and has entirely halted production on existing SubGraphs. I hope this can be resolved soon.
-
Korindian
Apr 17, 2021 18:04
Sorry, meant to write HDRP 11 on 2021.1.3f1, not 2020.1.3f1.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
This is a duplicate of issue #1328377