get collision info unity 2d code example
Example 1: unity oncollisionenter2d
void OnCollisionEnter2D(Collision2D col)
{
//This method will run when your 2D game object
//collides with something
Debug.Log("Collided");
}
Example 2: collision detector unity c# 2d
void OnCollisionEnter2D(Collision2D coll){)