OnTriggerEnter2D not being called?

Hey!

I’m trying to start with Unity but I’m having some problems.

I’m trying to recognize when a rigidbody2D enters in an area. For this, I created a gameObject and added a 2D Circle or Box Collider (checked “is Trigger”) and attached a script with OnTriggerEnter2D. This Object is the area. The OnTriggerEnter2D method is never being called.

I tried adding a script on the moving object with the OnTriggerEnte2D, but again it is never being called.

What am I doing wrong?

Your moving objects need a rigidbody2d on them for the trigger to function.