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.
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.
Thanks for putting in the bug report!
QA was able to reproduce the issue. Thank you and thumbs up!
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?
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.
They added the [VersionedCallback] attribute to workaround this issue. But it comes similar issues, see https://discussions.unity.com/t/834559
Thanks for the heads up Peter. We’ve been working on our own workaround so this info is very helpful.
You can use IBuildParameters.UseCache = false;
It’s better than delete the Build Cache.