SixWays / UnityShaderStripper

Modular utilities for shader stripping to drastically improve Unity build times
MIT License
350 stars 42 forks source link

Does this work in 2019.3? I get pink texture #6

Open keybol opened 4 years ago

keybol commented 4 years ago

Does this work in 2019.3?

keybol commented 4 years ago

Also, what are those 8 Ignore Shaders By Name you included in ShaderStripperVariantCollection

keybol commented 4 years ago

What does this warning mean?

Sigtrap.Editors.ShaderStripper.ShaderStripperEditor must be instantiated using the ScriptableObject.CreateInstance method instead of new ShaderStripperEditor. UnityEditor.EditorWindow:.ctor() Sigtrap.Editors.ShaderStripper.ShaderStripperEditor:.ctor() (at Assets/Editor/ShaderStripperEditor.cs:42) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

SixWays commented 4 years ago

It does work in 2019.3 - however ShaderStripperVariantCollection is unfortunately very hard to use correctly. Unity doesn't seem to actually include all necessary variants in the collection files it generates, so this stripper will strip far more than you actually intend. I recommend only using it for debug purposes, e.g. if you're testing a specific set of shaders and want to keep build time to an absolute minimum.

I'm not sure what you mean by the 8 ignore shaders by name. If "8" is a typo, and you're asking how Ignore Shaders By Name works, it just doesn't strip any shaders matching those patterns even if they're not in the collection(s).

That warning does pop up sometimes and I'm not sure why, but it doesn't seem to cause any problems for me.