Collider2D does not contain a defenition for tag

For some reason other.tag does not exist. I had to use other.gameObject.tag. I am using 2021.2.7f1 perhaps there was a change from the version rick was using ¯_(ツ)_/¯

1 Like

Hi, welcome back to the community.

Collider2D does have a definition for tag. Be sure that you are using the same type of parameter, you might be using Collision2D instead, which doesn’t have a definition for tag and has to be accessed by other components like GameObject or Transform.

Ahh that make sense thanks

Privacy & Terms