I really want to try shader graph in Unity 2018 but I can’t get it working.
Unity 2018.4.3 LTS, Shader Graph 4.10
I created a graph in project file viewer by click Create->Shader->Unlit Graph, then after rename it, and I tried double click, it throws null object reference exception, and an empty window is opened.
[Exception] Exception thrown while invoking [OnOpenAssetAttribute] method 'UnityEditor.ShaderGraph.ShaderGraphImporterEditor:OnOpenAsset (int,int)' : NullReferenceException: Object reference not set to an instance of an object
IconBadge.AttachTo() C:/buildslave/unity/build/Modules/GraphViewEditor/IconBadge.cs:143
MaterialNodeView.Initialize() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Drawing/Views/MaterialNodeView.cs:155
153: Add(wrongPipeline);
154: VisualElement title = this.Q("title");
-->155: wrongPipeline.AttachTo(title, SpriteAlignment.LeftCenter);
156: }
157: }
GraphEditorView.AddNode() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Drawing/Views/GraphEditorView.cs:322
320: var nodeView = new MaterialNodeView { userData = node };
321: m_GraphView.AddElement(nodeView);
-->322: nodeView.Initialize(node as AbstractMaterialNode, m_PreviewManager, m_EdgeConnectorListener);
323: node.RegisterCallback(OnNodeChanged);
324: nodeView.MarkDirtyRepaint();
UnityEditor.ShaderGraph.Drawing.GraphEditorView..ctor() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Drawing/Views/GraphEditorView.cs:150
149: foreach (var node in graph.GetNodes<INode>())
-->150: AddNode(node);
152: foreach (var edge in graph.edges)
MaterialGraphEditWindow.Initialize() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Drawing/MaterialGraphEditWindow.cs:530
528: m_GraphEditorView = null;
529: graphObject = null;
-->530: throw;
531: }
532: }
ShaderGraphImporterEditor.ShowGraphEditWindow() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Importers/ShaderGraphImporterEditor.cs:50
48: var window = CreateInstance<MaterialGraphEditWindow>();
49: window.Show();
-->50: window.Initialize(guid);
51: }
ShaderGraphImporterEditor.OnOpenAsset() Library/PackageCache/com.unity.shadergraph@4.10.0-preview/Editor/Importers/ShaderGraphImporterEditor.cs:60
58: {
59: var path = AssetDatabase.GetAssetPath(instanceID);
-->60: return ShowGraphEditWindow(path);
61: }
62: }
GUIUtility.ProcessEvent()
I noticed that shader graph has not been updated since a few months ago.
I need help.