Once imported into your project, Culling Mask Generator is very simple and intuitive to use.
Opening Culling Mask Generator
Select “Tools/Akiba/Culling Mask Gen.” in the Unity Editor window. This will open up the main Culling Mask Generator window.
Brief Overview
Within the Culling Mask Generator window, you will see the currently available layers within Unity presented on the left, each with a toggle and a few options at the bottom, and an empty list on the right.
Currently, there are a few options to customise the generator output:
- Select All – selects all layers
- Invert Selection – Deselects all selected layers, selects all unselected layers
- Deselect All – Deselects all layers
- Inclusive Only – Forces output to only include selected layers
- Exclusive Only – Forces output to only include unselected layers

Selecting Layers for Output
Depending on your use case (such as whether you want to explicitly only display certain layers, or want to explicitly only cull certain layers), the options you choose will change the output.
For example, by default Culling Mask Generator will always provide the shortest output, meaning if you select 10 of your 15 layers, the output will provide you with an inversion of the layers provided, and will create a mask telling the camera to NOT render the 5 unselected layers, rather than the 10 selected ones. If you select 5 of your 15 layers, the output will provide you with just the selected layers, creating a mask that will only render those 5 layers.
This behaviour can be useful if you intend to create additional layers later on that you do want displayed, or create additional layers later on that you do NOT want displayed, respectively.
This is what the “Inclusive Only” and “Exclusive Only” options are for, these options override this default “Shortest Output” behaviour, and will force the output to only include those selected, or those deselected, regardless of the output length.

Using Your Mask
Your newly created layer mask can be easily applied to any camera in code.
Once you have your output, simply click “Copy to Clipboard”, then apply it to a camera’s Culling Mask in your code like this:
