UICamera's event type determines what type of events are sent out. If it's set to 3D, then Physics.Raycast will be used, hitting Collider objects. If it's 2D, then Physics2D will be used instead, hitting BoxCollider objects. Whether it's UI or World then determines how the results are sorted. If it's UI, then all hits are sorted by widget depth. If it's World, then it's just as-is, based on the Z position.