Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question [URP]ShaderGraph not compiled

Discussion in 'Shader Graph' started by br_o, Jun 9, 2023.

  1. br_o

    br_o

    Joined:
    Aug 31, 2022
    Posts:
    7
    Hi.
    I'm using Unity2021.2.19.

    ShaderGraph will not compile because all variants in the shader will be stripped.

    Part of the log output.
    Why are all the variants removed?
    "Strip Unused Variants" in URP Global Settings is ON, but how do I get it to compile in this state?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Update unity to 2021 lts. This can easily be a bug.

    Also, how does the material show in builds?
     
  3. br_o

    br_o

    Joined:
    Aug 31, 2022
    Posts:
    7
    Thank you.
    So this could be a bug?

    Material will be pink.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Yes it could, it's generally a bad idea to stay on really old versions.
     
  5. br_o

    br_o

    Joined:
    Aug 31, 2022
    Posts:
    7
    I was able to compile by changing the keyword setting from "Multi Compile" to "Predefined".
    However, I do not think this is a fundamental solution.