How to detect whether my object is in a box?

Hi,

I’m designing a 2D game that when you drag and drop into a box you would get score. And game is 2D. I’m planning to use FingerGesture for drag and drop but I have no idea what’s the best and most efficient way to detect whether my objects are in a box.

I will have two boxes in the end but I’m trying to find the best way to do this as later I’ll get iOS export.

I thought of storing four points of each of my boxes and checking X and Y of each object to see whether it’s in the box but it’s order will be N and was more interested in a way that is Unity oriented that would be faster.

Thanks.

The Unity oriented way would be using a Box Collider with the isTrigger parameter checked.
The gameObject using the collider will receive OnTriggerEnter/OnTriggerStay/OnTriggerExit notifications you would need to handle through scripting.