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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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