unity oncollisionenter2d tag7 code example
Example: unity oncollisionenter2d
void OnCollisionEnter2D(Collision2D col)
{
//This method will run when your 2D game object
//collides with something
Debug.Log("Collided");
}
void OnCollisionEnter2D(Collision2D col)
{
//This method will run when your 2D game object
//collides with something
Debug.Log("Collided");
}