Search Unity

Bug shader graph loses reference to subgraph

Discussion in 'Shader Graph' started by laurentlavigne, Dec 27, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    + there is no way to reconnect the reference, unlike a missing ref, one has to reconnect the nodes by hand
     
  2. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    upload_2020-12-26_20-10-13.png
    upload_2020-12-26_20-10-25.png
    ArgumentException: JSON parse error: Invalid value.
    UnityEngine.JsonUtility.FromJson (System.String json, System.Type type) (at <7a84dc901f21458f98a12e112d4ba2ab>:0)
    UnityEngine.JsonUtility.FromJson[T] (System.String json) (at <7a84dc901f21458f98a12e112d4ba2ab>:0)
    UnityEditor.ShaderGraph.ShaderGraphImporter.OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Importers/ShaderGraphImporter.cs:90)
    UnityEditor.Experimental.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at <c84609c921cb488481d7d8a5fcdf9588>:0)

    ArgumentException: JSON parse error: Invalid value.
    UnityEngine.JsonUtility.FromJsonOverwrite (System.String json, System.Object objectToOverwrite) (at <7a84dc901f21458f98a12e112d4ba2ab>:0)
    UnityEditor.ShaderGraph.MinimalGraphData.GetDependencyPaths (System.String assetPath, System.Collections.Generic.List`1[T] dependencies) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Data/Graphs/MinimalGraphData.cs:78)
    UnityEditor.ShaderGraph.MinimalGraphData.GetDependencyPaths (System.String assetPath) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Data/Graphs/MinimalGraphData.cs:70)
    UnityEditor.ShaderGraph.ShaderGraphImporter.GatherDependenciesFromSourceFile (System.String assetPath) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Importers/ShaderGraphImporter.cs:68)
    UnityEditor.ShaderGraph.ShaderGraphImporter:GatherDependenciesFromSourceFile(String) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Importers/ShaderGraphImporter.cs:72)


    ArgumentException: JSON parse error: Invalid value.
    UnityEngine.JsonUtility.FromJsonOverwrite (System.String json, System.Object objectToOverwrite) (at <7a84dc901f21458f98a12e112d4ba2ab>:0)
    UnityEditor.ShaderGraph.MinimalGraphData.GetDependencyPaths (System.String assetPath, System.Collections.Generic.List`1[T] dependencies) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Data/Graphs/MinimalGraphData.cs:78)
    UnityEditor.ShaderGraph.MinimalGraphData.GetDependencyPaths (System.String assetPath) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Data/Graphs/MinimalGraphData.cs:70)
    UnityEditor.ShaderGraph.ShaderGraphImporter.GatherDependenciesFromSourceFile (System.String assetPath) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Importers/ShaderGraphImporter.cs:68)
    UnityEditor.ShaderGraph.ShaderGraphImporter:GatherDependenciesFromSourceFile(String) (at Library/PackageCache/com.unity.shadergraph@8.3.1/Editor/Importers/ShaderGraphImporter.cs:72)



    InvalidCastException: Specified cast is not valid.
    AmplifyShaderEditor.MasterNodeDataCollector.UpdateShaderImporter (UnityEngine.Shader& shader) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/MasterNodeDataCollector.cs:1657)
    AmplifyShaderEditor.StandardSurfaceOutputNode.Execute (System.String pathname, System.Boolean isFullPath) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/StandardSurface.cs:2690)
    AmplifyShaderEditor.MasterNode.Execute (UnityEngine.Shader selectedShader) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Nodes/Master/MasterNode.cs:554)
    AmplifyShaderEditor.ParentGraph.FireMasterNode (UnityEngine.Shader selectedShader) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:2651)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.SaveToDisk (System.Boolean checkTimestamp) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:1596)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.OnToolButtonPressed (AmplifyShaderEditor.ToolButtonType type) (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:1710)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.OnGUI () (at Assets/Scripts/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5202)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <c84609c921cb488481d7d8a5fcdf9588>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <c84609c921cb488481d7d8a5fcdf9588>:0)
    UnityEditor.DockArea.OldOnGUI () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <51648d78f489425494db94c505b138b2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364