Search Issue Tracker

Duplicate

Votes

0

Found in [Package]

12.0.0

Issue ID

1376547

Regression

Yes

[Shader Graph] NullReferenceException is thrown when saving a Shader Sub Graph containing a Keyword or Dropdown

Package: Shader Graph

-

How to reproduce:
1. Open the user-submitted project
2. In the project window, open the Shader Sub Graph "New Shader Sub Graph" (Assets/Shaders/new Shader Sub Graph.shadersubgraph)
3. In the Shader Graph window, click "Save Asset"
4. Observe the Console window (Window > General > Console)

Expected result: No errors are seen in the Console
Actual result: A NullReferenceException error is seen in the Console

Reproducible with: 12.0.0 (2021.2.0b15, 2021.2.1f1), 13.0.0 (2022.1.0a12)
Not reproducible with: 7.7.1 (2019.4.32f1), 10.7.0 (2020.3.22f1), 11.0.0 (2021.1.28f1), 12.0.0 (2021.2.0b14), 13.1.0 (2022.1.0a13)

Error in the Console:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ShaderGraph.ShaderSubGraphImporter+<>c__DisplayClass4_0.<ProcessSubGraph>b__2 (UnityEditor.ShaderGraph.ShaderStringBuilder sb) (at Library/PackageCache/com.unity.shadergraph@12.1.0/Editor/Importers/ShaderSubGraphImporter.cs:320)

  1. Resolution Note:

    Fixed in 13.1.0 available in 2022.1.0a13 and up

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.