Detect collision of 2 gameobjects with collider 2d

Hi guys.

I’m working in a educational game and i need to implement a drag and drop game.

How can i check if 1 gameobject that i drag is over other gameobject that is static ?

With collider2d i can only check if its overlaping a point…(gameObject.collider2D.OverlapPoint)

Thanks

You should probably use the OnCollision or OnTrigger messages.
Example:

void OnTriggerStay2D (Collider2D other) {
   if (other.gameObject == staticGameObject) {
      overlapping = true;
   }
}