|
How can you tell if a LayerMask contains a given layer.
(comments are locked)
|
I'm not sure how to get this working. Is the & supposed to be &&? I'm also writing in C# (Forgot to mention that). What return values am I checking for on either side of the &?
Mar 03 '11 at 03:53 AM
Patyrn
Figured it out. Thanks! if ((layersCheckedForTargets.value & <<layer) == 0) {}
Mar 03 '11 at 03:59 AM
Patyrn
Er sorry for my application I needed to see if it was NOT in layer mask. Above would be != if you wanted to check if it WAS in layer mask.
Mar 03 '11 at 04:00 AM
Patyrn
Yeah, C# doesn't seem to cast to bool automatically like that.
Mar 03 '11 at 05:34 AM
Eric5h5
(comments are locked)
|
