1. yourLayerMask |= (1 << LayerMask.NameToLayer("Default"));
  2. yourLayerMask |= (1 << LayerMask.NameToLayer("AnotherLayer"));
  3. yourLayerMask |= (1 << LayerMask.NameToLayer("Water"));

 

ref : https://answers.unity.com/questions/1103210/how-to-add-layer-to-layer-mask.html

반응형

+ Recent posts