Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Feedback Could not find subgraph asset with GUID

Discussion in 'Unity Collaborate' started by Bordeaux_Fox, Jul 24, 2020.

  1. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Hi,

    we encounter an issue when updating shadergraphs via Collab. Basically, some GUID's of subgraphs are lost everytime somebody is pushing an update via Collab. Since I don't know if it's either Shadergraph or Collab, I also ask here for help. :)

    This bug has a serious impact on our project because it affects every team member, slowing us down, causing level designers to see pink material. And we cannot ask every team member to fix the graphs on their own. Not everyone has a technical background and we do not want to risk somebody breaks shaders by accident.
    Every team member needs to manually fix the Shadergraph nodes manually ( ! ) each time an update is pushed ( ! ) or redownloading the entire project.

    It seems the subgraphs GUID's are somehow only valid for the local project from person who pushed the change. But for every other team member, this GUID is invalid. Unity cannot find the reference, causing shaders not compile.

    https://forum.unity.com/threads/could-not-find-sub-graph-asset-with-guid.937190/

    What's the proposed workflow for teams using Shadergraphs? Because I cannot believe we are the only team using Unity encountering this bug. We need Unity Collab to sync the shaders for all team members without any errors.
     
    Last edited: Jul 24, 2020
    sabint likes this.
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Bordeaux_Fox, that sounds incredibly frustrating! I would like our team to look further into whether this issue is with Collab or ShaderGraph. Can you please open a support ticket with us so that we can investigate it further? You can do that by doing the following:

    1. Navigate to project on the Developer Dashboard.
    2. Select Collaborate > Support from the left hand menu.
    3. Click on Open a Ticket and fill out the support form.

    It'll be very helpful if you can provide a small repro project that recreates the issue you're seeing with the GUIDs being lost.
     
  3. romanpapush

    romanpapush

    Joined:
    Sep 20, 2012
    Posts:
    40
    Hi!

    Same thing happens when I just copy my shaders from one project to another (no Collab, just different Unity projects and versions on the same machine): subgraph links are lost and I can't get them working (re-importing doesn't help).

    #Update: Oh wait, was able to get them working after a series of re-savings and re-imports.

    Unity 2020.1 with verified URP and Shader Graph versions 8.2.0

    upload_2020-8-5_12-27-51.png

    Code (CSharp):
    1. Error in Graph at Assets/_GAME/Shaders/Toony Opaque.shadergraph at node Toony Flat Base: Invalid Sub Graph asset at "Assets/_GAME/Shaders/_Base/Toony Flat Base.shadersubgraph" with GUID cea1ee3b567e443ab8872ef2f551374b.
    2. UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData(AssetImportContext) (at /Users/builduser/buildslave/unity/build/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:22)
    and

    Code (CSharp):
    1. ScriptedImporter for asset: Assets/_GAME/Shaders/_Base/Toony Flat Base.shadersubgraph, reported an invalid import dependency: 00000000000000000000000000000000
     
    Last edited: Aug 5, 2020
  4. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    35
    I'm having an issue with this as well. New URP project, copying a shader graph with sub graphs from another project. Haven't found any solutions online. Tried resaving and reimporting, but didn't work.
     
    segant and marcospgp like this.
  5. romanpapush

    romanpapush

    Joined:
    Sep 20, 2012
    Posts:
    40
    Were you able to resolve it?
    I don't quite remember what exactly fixed that for me, but have you tried checking if subgraphs are working in a new shader graph? Or force reloading the assets?
     
  6. szewa-polyu

    szewa-polyu

    Joined:
    Apr 6, 2017
    Posts:
    2
    segant and bantus like this.
  7. Slock20969

    Slock20969

    Joined:
    Nov 18, 2015
    Posts:
    15
    Were you able to fix this with export? I'd rather make an .asset then have to start copying folders around.
     
  8. chcoehffocheofgh

    chcoehffocheofgh

    Joined:
    Jun 11, 2020
    Posts:
    1
    I have the same issue with my Unity MacOS version, but what I did to solve this problem is very funny, because I found that the "Output" node has nothing input value, so I just connet the "Out(4)" with the "New(3)", and then the probelem ist easlly gone :)
     
  9. sabint

    sabint

    Joined:
    Apr 19, 2014
    Posts:
    26
    Just hit this problem after "git clone" of a project in a different computer. Had to fix ALL THE FREAKING SHADERS ONE BY ONE in the new computer. Problems with subshadergraphs, and custom functions from HLSL files.

    Is there a bug to track this? Has this been fixed? In which version? If not, when will the Unity team address an issue as fundamental as this?

    "Resaving, reimporting, etc" are not solutions. The thing has to import correctly upon opening the project.
     
    reggie5538 and MedalHellWay like this.
  10. TheAmazingB74

    TheAmazingB74

    Joined:
    Aug 28, 2015
    Posts:
    14
    2 years later and this is still a problem. Good job Unity!! Way to solve problems
     
  11. Danny327

    Danny327

    Unity Technologies

    Joined:
    Jan 4, 2021
    Posts:
    78
    Hi, I'm sorry this issue persists to this day. If you haven't done it already, could you create a bug report via the Report a Bug feature from the editor?