Search the Community
Showing results for tags 'scriptableobject'.
Found 1 result
Hi guys, I wanted to share my small contribution to ProBuilder: Since I use quite a lot the ability to change the vertex color of my PB mesh, I was quickly very limited by the fact that the PB vertex color palette has only 10 slots. Even with more slots, I needed the ability to store & order my colors properly, because I use some of them only in specific scenes for example. So I created a VertexColorPalette asset & manager: grab the C# script and put it in one of your Editor folders: ProBuilderVertexColorPalette.cs You can now create a VertexColorPalette object like any regular asset: A VertexColorPalette is simply a ScriptableObject. When selected, you can manually edit the 10 colors using the Inspector. You can directly "capture" the colors from the current PB palette by clicking the Load from ProBuilder button. When you what to replace the PB palette with the colors from one of your saved palette, select your asset and press Apply to ProBuilder button. Limitations: - You cannot "capture" a color from the current PB palette if the palette has been reset (colors will appear white), because resetting a palette doesn't seem to change pb_Constant.pbVertexColorPrefs. - When overriding the PB palette using the Apply to ProBuilder button, the changes won't appear if the Vertex Color panel is opened. Just close and reopen the panel to see the updated palette. Hope it will be useful Do not hesitate to suggest changes and/or improve it. Thanks, Yannick