Jump to content
yagero

Vertex Color Palette Asset & Manager

Recommended Posts

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:

Screenshot_13.png.8b3894b67921b5aa8ee277c842ecdb45.png

 

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.

Screenshot_14.png.1c0ba58acdd0016ed0c28d39fed60f90.png

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×