im making an endless runner game, in which i have the player moving towards the right, with the camera following him, and i generate platforms with random variations in their design which remain stationary and don't move anywhere.
i wanted the platforms which go off screen/off camera to get deleted. So, I created an empty called remover with a trigger collider and wrote a script for the platforms to delete themselves when they touch the remover object. However, voidontriggerenter2d just... doesnt work. In the image attached here (screenshot from game during runtime), the trigger is very clearly colliding with the platforms, but the ontriggerenter2d just doesnt register it for some reason.