This function is called when the map starts, before entities have been initialized. The main purpose of this is to precache all resources for the map.