Search Unity

Resolved Unity 2021 - Shader Graph not working

Discussion in 'Shader Graph' started by rtilton1, Jul 12, 2021.

  1. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    I'm in a brand spankin new project in Unity 2021.1.14f1 using 3D Sample Scene URP. I create a new shader graph > blank shader graph -- and the material is magenta/pink showing it's not compiling. Did no one test this in 2021 or am I doing something wrong?


    I also notice whenever I add any node into the scene it shows me this error too... It says "Node is not allowed by any active targets, and will not be used in generation".
     
  2. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    Just figured out I need to go into Graph Settings and click add target and set it to Universal. Then it compiles.

    Very unintuitive design here.... Please just auto-assign a target unity. 99% of users will only have 1 render target anyways.
     
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,306
    Actually I don't think this is big problem, as I remember there are multiple presets like VFX, empty Lit, Unlit with default targets, plus your graph displayed information about the problem.
     
    Kmankman and FredMoreau like this.
  4. Wasp3r

    Wasp3r

    Joined:
    Dec 6, 2020
    Posts:
    7
    Thank you! I totally agree. I've spent half of an hour on this until I found your post...
     
    Kmankman likes this.
  5. shavais

    shavais

    Joined:
    Sep 18, 2012
    Posts:
    2

    Dang, I can't imagine how long it would have taken me to find that. Thanks for the post!
     
    Kmankman likes this.
  6. eecoo

    eecoo

    Joined:
    Apr 21, 2021
    Posts:
    1
    My target list appears empty and i cant add anything, so i cant choose universal, can someone help me?
     
  7. AaronDeBelder

    AaronDeBelder

    Joined:
    May 7, 2021
    Posts:
    1
    You need to install the Universal RP package from the package manager
     
  8. JackISO_

    JackISO_

    Joined:
    Apr 15, 2022
    Posts:
    1
    Thank you so much!
     
    Kmankman likes this.
  9. mkfaizurrahman381389

    mkfaizurrahman381389

    Joined:
    Aug 19, 2022
    Posts:
    1
    But where are the graph settings ????
     
    Kmankman likes this.
  10. superscruf

    superscruf

    Joined:
    Apr 24, 2019
    Posts:
    1
    When you click on your texture asset, it defaults to "Node Settings" in the Graph Inspector. On the top bar of the Graph Inspector, just under the words "Graph Inspector", there are two clickable options; "Node Settings" and "Graph Settings." When you click on "Graph Settings, then the bottom of the window will allow you to select a target. If you click on the "Add Target" button and it just stares back at you, then install the Universal RP package from the Package Manager.
     
    Kmankman likes this.
  11. VirtualBoyBri

    VirtualBoyBri

    Joined:
    Jan 27, 2016
    Posts:
    6
    Thanks for this! Saved me a few hairs on my head. Was having the same issue as I'm learning to use Shader Graph.
     
    Kmankman likes this.
  12. mdh560354

    mdh560354

    Joined:
    Dec 26, 2021
    Posts:
    2
    Thank youuuuuu kissssss
     
    Kmankman likes this.