Search Unity

Caching of Shader Variants not working in 2021

Discussion in 'Universal Render Pipeline' started by unnanego, May 2, 2022.

  1. unnanego

    unnanego

    Joined:
    May 8, 2018
    Posts:
    199
    I know there's this forum post, but none of the suggestions work from there. I have two relatively small projects with less than 30 shaders each, but on 2021 every build takes A LOT of time - every build it's compiling millions or even billions of shader variants (if M stands for million) - adding a shader variants file, choosing any type of shader stripping, disabling optimize mesh - nothing has an effect.
    Please, help, this makes it impossible to switch to 2021. The very same projects on 2020 build in a minute.
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,019
    Hi! There's also this form post.
    TLDR; it's a known issue; it's not compilation that takes time, but preparing variants for compilation. We're working on a solution.
     
    unnanego likes this.
  3. dnach

    dnach

    Unity Technologies

    Joined:
    Mar 9, 2022
    Posts:
    89
  4. AlonMixed

    AlonMixed

    Joined:
    Dec 10, 2017
    Posts:
    23
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,019
  6. unnanego

    unnanego

    Joined:
    May 8, 2018
    Posts:
    199
    It doesn't say when they are coming. We are waiting for the looooong build times already now!