Skip to main content

Custom Properties

The shader tooling supports custom properties, if you want to edit the shader code. This includes support for locking, property animations, renames, presets and shader UI (not including dropdowns/tabs).

To add a new property, open the Packages/gay.shader.voxels_1/Shaders/Voxel.shader file and scroll down in the Properties block until you see @CustomProperties. You may add your own properties under that comment. Make sure they aren't tagged with [HideInInspector] otherwise they will not show up.

Custom properties cannot create foldouts so you can ignore the CopyPrefix attribute. It's used for organizing how copy/paste/reset should work on foldouts and groups.

These will show up in the Custom Properties dropdown at the bottom of the material editor.

Attribute names and behaviours aren't locked in stone and may change at any time. So beware of breaking changes when changing versions. They aren't explicitly documented so their meaning will have to be inferred from the existing properties.

You can then open the Packages/gay.shader.voxels_1/Shaders/Voxel.cginc file and edit your new property variables after the @CustomProperties comment. If you have any textures you wish to add, add them outside of the !defined(BAKED) preprocessor block.

Custom properties