Version: 2023.2
Add a layer to a layerMask
约束

Remove a layer from a layerMask

To remove a layer from a layermask, use the logical AND operator on the original layermask and the bitwise complement of the layer to remove it.

originalLayerMask &= ~(1 << layerToRemove);

其他资源

Add a layer to a layerMask
约束