Hi guys,
I would like to know, from an exported build, if a shader variant has been stripped during the export. I am specially interested about the instancing variant.
I have a shader which support GPU Instancing. However the material of this shader is created at runtime, and I enable the instancing via the scripting API.
Since there is no material asset with instancing enabled using this shader in the project, the export strips the instancing variant of my shader when the “Instancing Variants” property is set to the default “Strip Unused” value in the Graphics Settings:
Is there any way to know is my instancing variant has been stripped from the exported build?
When I enable the instancing from script, the bool stays properly at true, so I cannot check that:
material.enableInstancing = true;
I also tried to check if the keyword INSTANCING_ON was enabled (via Material.IsKeywordEnabled) since it appears in the frame debugger, but it’s never possible to retrieve it from script (even when the instancing variant is properly exported).
Thank you.