private void OnTriggerExit(Collider other) { RoomInhabitantComponent inhabitant = other.GetComponentInParent <RoomInhabitantComponent>(); if (inhabitant != null) { inhabitant.OnRoomExited(this); _roomInhabitants.Remove(inhabitant); } CleanUpInhabitants(); }