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

Bug (Case 1321433) Addressables/SBP don't detect IPreprocessShaders changes

Discussion in 'Addressables' started by Peter77, Mar 13, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Adding and changing an IPreprocessShaders implementation doesn't cause Addressables/SBP to rebuild shaders. You have to purge the build cache for IPreprocessShaders changes to take effect.



    I'm using Unity 2019.4.20f1 and Addressables 1.17.6.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    Thanks for putting in the bug report!
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    TreyK-47 likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    The bug-report was closed with "By Design", because it involves to much work to fix.

    upload_2021-7-4_16-56-0.png
     
    Last edited: Jul 4, 2021
  5. smg-sean

    smg-sean

    Joined:
    Feb 9, 2022
    Posts:
    3
    Can confirm. To ensure IProcessShaders is called it seems as though you need to delete the Build Cache.

    We've attempted to isolate the issue further and delete the ShaderCache folder, and yet IProcessShaders still isn't triggered.

    This is currently affecting our team and is ballooning our iteration/build times.

    Is there a known workaround for this?
     
    CDF, Peter77 and crowejohn20 like this.
  6. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Putting this issue into perspective. Our iteration times (checkout, test, build, deploy) on multiple platforms was around 20mins.

    The quickest workaround to this issue that we have found is to delete the library folder. Builds times are now, at their quickest around 1hr 20mins. On other platforms it's much, much slower.

    This has put a big dent into our iteration\playtesting\test times. It's massively impacting our project, designers and devs.

    Perhaps this issue is too much for Unity to fix atm but we are here, developing in this way, due to your documentation.

    What is the recommended workaround for this issue? Is there another way to trigger the shader compilation via our build scripts?

    We would really appreciate a solid workaround for this issue. Deleting the library folder is just not tenable.

    Cheers.

    @Eric5h5 @davidla_unity tagging you folks as Trey and laurentp don't seem active anymore and I'm not sure who is mod is for SBP\Shaders. Hope that is cool.
     
    Last edited: Aug 8, 2022
    smg-sean likes this.
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    smg-sean and crowejohn20 like this.
  8. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Thanks for the heads up Peter. We've been working on our own workaround so this info is very helpful.
     
    Peter77 likes this.
  9. mepkatatsu

    mepkatatsu

    Joined:
    Jun 8, 2023
    Posts:
    2
    You can use IBuildParameters.UseCache = false;

    It's better than delete the Build Cache.