Player death on crushing force

I’ve recently started using Unity, and I’m making a simple 2D platformer to get used to everything. I’ve got some moving platforms, and I want the player to be killed when he’s stuck between a moving platform and a solid wall. I’m not quite sure of the best way to approach this. The player is a non kinematic rigid body, but I can’t figure out how to detect a crushing force. I wouldn’t mind setting it up without physics, but I don’t quite know where to start with that.

You could use Collider.OnCollisionEnter to detect when your player is touching both walls.