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
- Crash on FindNearestVertex when objectsToSearch array contains a null transform
- Context menu item checkmark updates only after reopening twice when using Menu.SetChecked on component context menu items
- Long Property names are not truncated in the Add Property dropdown in the Animation window when the Long Property name does not fit
- [iOS] High CPU load when device keyboard is open
- Selected Animation clip in the Animation window changes when the Domain Reload is triggered
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