We are working through the process of dealing with shaders and bundles. There are a couple conditions that work, but there are some concerns that arise around Standard Shader, and one that extends Standard Shader.
Including Standard Shader in “Always Included Shaders” seems to be counter indicated, resulting in the following warning:
Shader “Standard” with 157766 variants
is marked as always included (see
Graphics Settings). This will result
in long build times and runtime memory
consumption. Please use a shader
variant collection instead.
The documentation on how to follow the indicated “instead” is thin at best, and nonexistent perhaps more accurately. A shader variant collection cannot be included into the “Always included Shaders” list, but can be included into the “Preloaded Shaders” list. It is not clear however if the preloaded shader list ALSO achieves force including the selected variants. Right now we are left with a possible false positive because there may be a material getting included into the main build that is doing this for us.
I’m looking for better clarity on the golden path implied by the above warning for using ShaderVariantCollection to force included needed variants.