Search Unity

Question How to Force ALL Shaders to Recompile????

Discussion in 'General Graphics' started by transporter_gate_studios, Sep 6, 2021.

  1. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    How do you force all shaders to recompile? I accidentally put a conflicting reference in shader graph that broke my shaders and even after removing it many of my shaders are black now.
     
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595

    you can probably right-click shader ( or all of them ) and choose to reimport.
    however this isn't likely going to work if you're using compute shaders
     
  3. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    Building the project seems to work
     
    HIBIKI_entertainment likes this.
  4. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Yes your final compilation would occur during builds.
    did building fix the issue or was it that because it was recompiled then it removed your previous error?
     
  5. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    yes i had to build. The shaders were broken until i did that, even after i removed the conflicting reference.
     
    HIBIKI_entertainment likes this.