Trigger is not working

I have 2 objects, both with box colliders, 1 of them the isTrigger box is checked, but nothing happens.

     private void OnTriggerExit(Collider other) {
        Debug.Log("Building is triggering...");
        Destroy(other.gameObject);  }

I found out the reason. **One of the objects should have a rigidbody attached to it for detecting the collision. **
Anyway, I still wonder if it is possible without rigidbody.


The scripting system can detect when collisions occur and initiate actions using the OnCollisionEnter function. However, you can also use the physics engine simply to detect when one collider enters the space of another without creating a collision.

A collider configured as a Trigger (using the Is Trigger property) does not behave as a solid object and will simply allow other colliders to pass through. When a collider enters its space, a trigger will call the OnTriggerEnter function on the trigger object’s scripts