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 GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
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