It is well-known that in unimodular gravity (UG) the cosmological constant is not sourced by a constant energy density, but rather appears as some sort of integration constant. In this work we try to flesh this out by studying in some detail a couple of examples, one from cosmology and the other from gravitational collapse.