Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

is there a way to "force" shaders to update when CGINC files are updated?

Discussion in 'Shaders' started by antislash, Jun 25, 2015.

  1. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    hello,
    i think lots of people had this problem.
    when you make changes to a cginc file the shaders are not updated unless you make a change to it.
    that is veru annoying when you have tens of shaders to update.

    did someone find a workaround for this?
    thanks
     
  2. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    Anytime I update a cginc file, it automatically recompiles every shader in the folder. That's actually somewhat annoying, too, but probably better. Are they using CGINC's in the same folder?

    If they are, I'm not sure, I have not set anything in particular. It's Unity 5.1.
     
  3. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    yep ech time i change cginc it "recompiles" or checks every shader but it doesn't updatethem unless i change a bit in them
     
  4. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    I normally have anything that relies on an include separated in a folder that I can right click and reimport them all for convenience.
     
    antislash likes this.
  5. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
  6. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
    5.5.0f3 is still doing this
     
  7. DanteMarshal

    DanteMarshal

    Joined:
    Aug 25, 2020
    Posts:
    10
    2020.3.18f1 is still doing this -_-
    In my case with Compute shaders
     
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    @DanteMarshal please report a bug - this is not something we've seen in a long while.