Shapes Lite?
After installing Shapes for our mobile game so that we can get improved line drawing quality, we noticed the build size went up by 3MB, which is quite a bit if you're a mobile or WebGL game. Almost all of the size is due to Shapes files that are in Resources folders for immediately mode usage. "Shapes Assets" takes quarter MB and the rest is mostly all the various shaders and materials. No doubt these shaders will only grow as more features are added to Shapes in the future. It seems like I can probably reduce the size of the Shapes Assets by reducing the detail levels significantly on the various primitives that we don't use (in Shapes Settings). But it would be GREAT to also have a way to select which shapes we actually are using in the game and also which blend modes. Then when we generate the shaders, it wouldn't bother creating or loading materials and shaders for those variations. Then if some future unaware coder on our team did try to use them in immediate mode, Shapes would just use a magenta shader or something obvious to show that the shader wasn't generated. Or even just a warning message and graceful fail would be fine.
Thank you for considering this feature!
Yeah opt-out is exactly what I was thinking too. Include all of them by default and then if you opt-out of a primitive and/or blend mode, any immediate mode commands for opt-out primitives that you execute would log a warning and fail.
Right now when we manually deleted the shaders+materials, we get hundreds of warnings about missing materials upon first use of Shapes. The primitives we do use work fine (we are using immediate mode for these). If we try to use immediate mode primitives for deleted materials then it says that it found a null material, followed by a NullReferenceException.