Unity Editor spends MINUTES compiling shaders, every time I start the editor
Hi,
I'm using a custom "standard" shader for pretty much all my objects in a scene. The shader has about 18 "#pragma shader_feature"s. Any time I modify the shader, the editor takes a long time recompiling it, but I figured this makes sense as there would be a lot of variations. However, every time I restart the editor, it takes several minutes to load the scene. After the scene loads, if I move the camera to look at objects previously unseen, the editor freezes for several more seconds. This happens more than once, usually up to ten times, before the editor runs smoothly. This means that every time I open up my project, I have to spend between 5-10 minutes "warming up" the editor, which is really killing productivity.
I've noticed that when I build the project using Shader Variant Collections, this problem is non-existent. So my question is: Is there something I'm missing here? Why can't the editor do the same as the built game? I've tried calling Shader.WarmupAllShaders in the editor but that didn't do anything. I'm using 5.5.2f1 for reference, and I'm getting no errors.
Thanks