Simple 2D Triggers Not Working

Hello,
I searched a lot about my problem all i found issues were addressed in 2013 and fixed in unity v4.5, however my problem still exist.
I am doing a very simple 2 sprites (bullet and a spaceship) with 2Drigidbody (for velocity movement) (isKinmatic disabled on both) and with 2D polygon colliders marked both as triggers.
I used :

 public void OnTriggrEnter2D(Collider2D collision)
    {
        Debug.Log(collision.gameObject.name);

       // if (collision.gameObject.tag == "Enemy")
        //{
            //Instantiate(spark, transform.position, transform.rotation);
        //}
        // Destroy(this.gameObject);

    }

I had high hopes to get it to work from the first time … but then I commented out all the action of sparks / explosions, yet not even debug.log is working
what am I doing wrong ?!

You wrote OnTriggrEnter instead of OnTriggerEnter. Notice the e missing?

1 Like

oh god, this thing got me insane yesterday, I am at work atm, so I will check it when i get back to my house.
and for the info, I didn’t write it myself, I used implement something something from visual studio, and it writes the function for me, I wonder how did it miss spell :eyes:

Maybe the unity plugin for vs is wrong, try to see, if they updated it.

Hi thanks for your help it is working fine now, not it is not wrong , i must have deleted e by mistake ? … and maybe i then copied the whole method and started pasting it instead of using (implement monobehavior).