#I get this error "The name 'HasLayerInMask' does not exist in the current context"

1 messages · Page 1 of 1 (latest)

sacred lava
solar vector
#

where? which line?

sacred lava
#

85

solar vector
#

line 85 is {

sacred lava
#

so 84

solar vector
#

No. Check the code you posted

sacred lava
#

yes error is in the if statement on line 84

solar vector
#

line 84 is
if (collision.collider.gameObject.layer == _groundLayer)

sacred lava
#

sorry

solar vector
#

so you need to prefix the methodname with the class name containing the method

sacred lava
#

if (PhysicsPickup.HasLayerInMask(_groundLayer, collision.collider.gameObject.layer))