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 Incremental Builds always Compile Shaders

Discussion in 'Editor & General Support' started by notMateo, Jul 26, 2023.

  1. notMateo

    notMateo

    Joined:
    Mar 2, 2018
    Posts:
    36
    Whenever I try and build my game to the same folder with a minor change (tested by simply disabling a scene object), it doesn't seem to be compiling incrementally; it takes as long as a full build and takes about two minutes to compile shaders, which haven't changed. This isn't super long, however, I'm developing a multiplayer game and having to build the game multiple times, which is getting very time-consuming.

    How can I verify incremental builds are working?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Do a clean build and measure how long the shader builds take.
    It will some time, but should be a lot faster.
    And make sure you aren't on an old unity version
     
  3. notMateo

    notMateo

    Joined:
    Mar 2, 2018
    Posts:
    36
    Using 2021.3, is that an issue? Clean builds are the exact same amount of time.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    2021.3 also has had many updates. Right now it's on .29
    Worth a try.

    If it's the same amount of time, does your project have many different shaders? If you just use a few, the compilation is alright by default
     
  5. notMateo

    notMateo

    Joined:
    Mar 2, 2018
    Posts:
    36
    Oh Goodness, never replied to this! Just wanted to say it seeeeems to have just started working, but I'm not sure when; I did update to .29, and maybe that's why, but I can't verify. At any rate, thanks for the help!
     
    DevDunk likes this.