Search Issue Tracker
Fixed in 7.1.8
Votes
1
Found in [Package]
6.5.0
Issue ID
1131584
Regression
Yes
[ShaderGraph] Subgraph references not updating correctly
Something is wrong in the asset dependency system. SubgraphNode instances dont update correctly when the reference graph is updated. This can cause nullref errors that destroy graphs. See repro steps.
Repro Steps:
- Create a new Shader Graph
- Create a new Subgraph
- In the Subgraph add a new output Slot
- In the Subgraph add a new Vector1 property
- Drag Vector1 property onto the graph and connect to Output node
- Save Subgraph
- In the Shader Graph, add an instance of the Subgraph
- Set Subgraph Node input slot value to 1, notice the preview of Subgraph node is now white (correct)
- Go back to Subgraph and disconnect property from Output node
- Save Subgraph
- Go back to Shader Graph, notice preview is still white (wrong)
- Notice editing input slot value on Subgraph node still affects Subgraph output value (wrong)
- Go back to Subgraph and delete Vector1 property
- Save Subgraph
- Go back to Shader Graph, notice null ref errors, graph is locked and asset is ruined (this is not fixable).
Error:
```
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphing.NodeUtils.GetEffectiveShaderStageCapability (UnityEditor.ShaderGraph.MaterialSlot initialSlot, System.Boolean goingBackwards) (at D:/Git/ScriptableRenderPipeline/com.unity.shadergraph/Editor/Data/Implementation/NodeUtils.cs:191)
```
The error occurs as the Subgraph node is trying to access null slots
Comments (2)
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
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- GC.Alloc called by HDRenderPipeline.LensFlareMergeOcclusionDataDrivenPass() when playing the default HDRP Sample Template project
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
- Editor crashes on D3D12GetInterface when repeatedly enabling and disabling 256 text components
JotaRata
Mar 07, 2019 04:02
Save issue here, I am unable to modify any existing Subgraph without getting a NullReferenceException, the ShaderGraph window doesn't open and If it does it won't save any changes until I restart Unity