You should be using either

LayerMask.GetMask("A", "B")

or

(1 << LayerMask.NameToLayer("A")) | (1<< LayerMask.NameToLayer("B"))

or if you wanna make life easy, just add a public LayerMask field and set in in the inspector

public LayerMask layerMask
반응형

+ Recent posts