When I put all my shaders into an assetbundle Unity will stop determining which shaderfeatures are being used and not include any of them. ShaderVariantCollection doesn't seem to help at all when it comes to including variants of the shader in assetbundles.
It seems it only detects which shaderfeatures I'm using if the materials are in the same asset bundle as the shader itself, so I've managed to hack around it by just creating dummy materials of all the shader variants used in the project and putting them in the assetbundle. It works perfectly but seems hackish and I'm wondering if there's some better/proper way of doing it.
↧