Plays a role in cytotoxic granule exocytosis in lymphocytes. Required for both granule maturation and granule docking and priming at the immunologic synapse. Regulates assembly of recycling and late endosomal structures, leading to the formation of an endosomal exocytic compartment that fuses with perforin-containing granules at the immunologic synapse and licences them for exocytosis. Regulates Ca(2+)-dependent secretory lysosome exocytosis in mast cells. Interacts with DOC2A (By similarity). Interacts with RAB27A. Colocalizes with cytotoxic granules at the plasma membrane. Localizes to endosomal exocytic vesicles. Expressed at high levels in spleen, thymus and leukocytes. Also expressed in lung and placenta, and at very low levels in brain, heart, skeletal muscle and kidney. Expressed in cytotoxic T-lymphocytes (CTL) and mast cells. The MHD1 and MHD2 domains mediate localization on recycling endosomes and lysosome. The disease is caused by variants affecting the gene represented in this entry. Belongs to the unc-13 family. UNC13D mutation db