I've seen multiple tutorials that told me to use bit-shifting to create a LayerMask, like this: Code (CSharp): int layerMask = 1 << LayerMask.NameToLayer("Test"); But I just noticed there's this function called GetMask() that does the exact same thing: Code (CSharp): LayerMask lm = LayerMask.GetMask("Test"); What's the difference? Why use bit-shifting (which honestly feels completely out of place in Unity) when there's this function that does it for me?
Seems to me like someone just made a method of convenience so you wouldn't have to bitshift ( which is not as easily understandable as just using a method)