Problem with oncollisionexit

If I have 2 cubes where one is acting as a platform for the other to sit on and I call setactive(false) on the platform cube. The cube that was sitting on the now nonexistent platform doesn’t have the oncollisionexit event get triggered. Is this expected behaviour or should oncollisionexit get triggered?

Thanks!

If you destroy or deactivate an object or collider while it’s in collision, it will not send an OnCollisionExit or OnTriggerExit message. OnXXXEnter and OnXXXExit messages only get sent if both colliders are active at the moment they change from colliding to not-colliding.

Move the collider off screen for a frame before destroying it. Should work. I’d suggest using Rigidbody.position.