OnTrigger enter not registering.

There’s a million questions like this, I even checked a few, but I just can’t spot what I’m doing wrong. I’ve even used trigger in the past successfully, but not I just can’t seem to get it to work.

I’ve got two blocks. Once the block enters the other’s trigger, they would clamp together. However I can’t even get past the triggering part. I’ve checked that they are on the same layer, collision matrix checks out, both have rigidbodies. I’ve moved the trigger and normal colliders around between them without any change.
Here’s the code:

    private void OnTriggerEnter2d(Collider2D collider)

I even recorded a video of it in a test environment, in case someone can spot something: What am I doing wrong? - YouTube

See that the function is not blue, so is a custom function. All monobehaviour functions (Start, Update, OnCollision, OnMouse…) will be blue as (float, int, public …)

OS you misstyoped the function name, is 2D, not 2d.


Of course it’s something simple like that, that I’ve missed a hundred times going over it :smiley: