I added a script to an object with a box collider which has pretty much this
void OnCollisionEnter2D(Collision2D col)
{
Debug.log(col.gameObject.name);
}
And the thing is, that the first time that I hit this object with my player or anything, it gets called and displays the gameObject name on the console, but after I hit it again, nothing happens, it only gets called on the first collision and then never again until I restart the game. Any ideas?