I know that you can set up a Layer Mask through code with the LayerMask.NameToLayer
function, and that public layer masks can be set through a dropdown in the editor.
However, a bug in the current version of Unity (5.3.5) is causing my editor to crash on close, and it periodically resets my public layer masks. Seems like a good opportunity to set up these masks in code once and for all - except I’m not sure how.
I suppose the 1 << LayerMask.NameToLayer
command takes the layer’s int and converts it into a bit value that the layer mask can understand, but how would I give it more than one value?