Search Unity

Bug ShaderGraph files keep being unrecognized after upgrading to 2020.2

Discussion in 'Shader Graph' started by jgmakes, Dec 29, 2020.

  1. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    I've recently upgraded from 2019.4 to 2020.2 and Unity has stopped recognizing my ShaderGraph shaders a few times. That is, the assets in the project window show them as unrecognized file types, and the geometries when rendered are that beautiful hot 404 pink :)

    EDIT: I've noticed this happening after I return to Unity having made changes to script files and Unity goes through the process of inspecting/compiling. These script changes have nothing to do with the materials or the render pipeline whatsoever.

    Screen Shot 2020-12-28 at 10.13.14 PM.png

    ShaderGraph 10.2.2 and URP 10.2.2 are both still installed when this occurs. And I'm not seeing any errors or anything in the console, so I'm not sure how to debug this.

    Screen Shot 2020-12-28 at 10.13.55 PM.png

    When I close and reopen the project / unityHub et al, nothing is changed. They're still unrecognized.

    But it's fixed if I Uninstall the URP and Shader Graph packages, and then reinstall Shader Graph and then URP in that order. Also strange is that when I reopen the project having done this, the Shader Graphs are still recognized, so there's some information saved/cached somewhere about having fixed it. It's not a change that Git recognizes, and I'm pretty much using Github's .gitignore Unity template without many changes.

    This is pretty irritating.

    Aside: There have been many weird in the upgrade from 2019 to 2020. I've tried many approaches as well: e.g. via simply reassigning the project version in UnityHub, or also starting a fresh project in 2020 and dragging in Assets and whatnot after the fact. It's been challenging given my project's requirements: URP + PostProcessing, ARFoundation, and a host of Google Firebase components... and all of these things don't always play nice together.

    Anyone seen anything like this / any potential fixes?
     
    Last edited: Dec 29, 2020
    tonytopper likes this.
  2. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I've also had similar issues with 10.x in particular. Made me stay in 8.x ... really annoying and I had trouble reproducing the issues, but I definitely had them multiple times.
     
  3. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    To clarify, the 10.x and 8.x are versions of URP, right? Did you ever actually upgrade successfully?

    Also did your problem happen on all shadersgraph assets, or just the ones that had originally been created in another version of Unity?
     
  4. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    similar issue here, do you get an error "ArgumentException: JSON parse error: The document root must not follow by other values." when clicking "Open Shader Editor" in the inspector on one of the broken assets?
     
  5. TheInterloper

    TheInterloper

    Joined:
    May 28, 2017
    Posts:
    5
    I'm also having the same issue. Have to uninstall and reinstall URP and shader graph packets, then check the assets that have reverted away. Have you reported it as a bug yet?
     
  6. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    Yeah, I reported the bug via the Unity Editor affordance. I'm not sure if that's still the best way to get in their queue. I imagine that having other people +1 the post is helpful. Thankful that unlike the bug report, this can grow to collect more granular detail from others.
     
  7. TheInterloper

    TheInterloper

    Joined:
    May 28, 2017
    Posts:
    5
    True. I'd love to know if you hear back from them. I have to uninstall and reinstall URP / SG up to a couple times a day because of this, which isn't awesome.
     
  8. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    To continue production I've had to drop back to 2019.4 unfortunately, but if you open the offensive shadergraph in a validator that would give someone who decides to attack this bug some good clues for bug-fixing :)
     
  9. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    I'll ask the team internally about getting an update to your bug report.
     
  10. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    Awesome :)
     
  11. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    Hi @UnityMaru,
    any sense if this is being worked on?
    Uninstalling and reinstalling URP constantly is a game stopper and is keeping us from moving to 2020 (in 2021 :)).
     
  12. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hey! I've not heard back yet but when I do get something concrete for you, I'll let you know as soon as I can.
     
  13. TheInterloper

    TheInterloper

    Joined:
    May 28, 2017
    Posts:
    5
    Thanks for this
     
  14. TheInterloper

    TheInterloper

    Joined:
    May 28, 2017
    Posts:
    5
    Well, I don't think we're going to get a definitive answer for this. However, I upgraded to 2020.3.0 LTS, URP 10.3.2, shadergraph 10.3.2 and I've yet to have an issues. It's only been a few days, however that's longer than I lasted with previous versions.
     
  15. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Going to do the same! Hopefully it's stable.
     
  16. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    226
    +1

    I just had this problem after updating from 2021.2.13f1 to 2021.3.3f1.

    On ShaderGraph 12.1.6 and URP 12.1.6

    Also, have this error: (though I am not sure it's related)

    Code (CSharp):
    1. Library\PackageCache\com.unity.entities@0.50.1-preview.2\Unity.Entities\RetainBlobAssetSystem.cs(6,5): error SGICE002: Seeing this error indicates a bug in the dots compiler. We'd appreciate a bug report (About->Report a Bug...). Thnx! <3 System.IO.IOException: Cannot create 'C:\...\Library\Bee\artifacts\1900b0aEDbg.dag\Unity.Entities.AdditionalFile.txt' because a file or directory with the same name already exists.
     
  17. chrisheld

    chrisheld

    Joined:
    Apr 15, 2013
    Posts:
    8
    Same with me. switched from 2022.1.X to 2022.1.21f1. However, no matter how many times I unintall/reinstall URP & Shader Graph, they remain like this:

    upload_2022-11-15_12-32-53.png
     

    Attached Files:

  18. lgarczyn

    lgarczyn

    Joined:
    Nov 23, 2014
    Posts:
    68
    Same problem upgrading to 2022.2.5 or 2022.2.6

    Upgrade project

    uninstal urp

    close project

    Reopen project

    get error "cannot find package Universal Render Pipeline 14.0.5"

    delete package-lock.json

    open project again (in safe mode if compilation error)

    add back the line for urp in the manifest.json, with 14.0.6

    all shader files corrupted again
     
  19. ggama

    ggama

    Joined:
    Jun 4, 2021
    Posts:
    10
    Same problem here using 2022.3.7f1. What's even more odd is that the same project on another machine works perfectly fine. And on this one all the objects w/ materials that contains Shader Graph's shaders are pink. And it can only be fixed by manually going one by one to each .shadergraph file, double click it and save asset. I've already tried remove/install URP and Shader Graph but still global impact.on all materials.
     
  20. lgarczyn

    lgarczyn

    Joined:
    Nov 23, 2014
    Posts:
    68
    Have you tried just selecting all the graphs and clicking reimport ?

    Barring that, reimporting the whole project?