The development of different cell types must be tightly coordinated. The developing head of Drosophila melanogaster represents an excellent model to study the molecular mechanisms underlying this coordination because the eye-antennal discs contain the anlagen of nearly all adult head structures. We studied the genome wide gene expression dynamics during eye-antennal disc development in D. melanogaster to identify new central regulators of the underlying gene regulatory network. Expression based gene clustering and transcription factor motif enrichment analyses revealed a central regulatory role of the transcription factor Hunchback (Hb). We confirmed that hb is expressed in two polyploid retinal subperineurial glia cells (carpet cells). Our functional analysis shows that Hb is necessary for carpet cell development and loss of Hb function results in abnormal glia cell migration and photoreceptor axon guidance patterns. Additionally, we show for the first time that the carpet cells are an integral part of the blood-brain barrier.