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
- "Customize handled extensions" part in the External Tools settings tab is not aligned with other properties
- Editor Diagnostics foldouts do not open when clicked on the foldout title
- [UI Builder] Visual Elements are not placed at the mouse cursor position when Absolute Position Placement is enabled
- "Width" and "Height" text is misaligned with slider ends in Screen Match Mode Parameters section of Panel Settings Asset
- Editor does not quit when Editor is not in focus and any floating window is opened
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