//deselect the building if it's selected:
        public override void OnDeselected()
        {
            if (IsSelected == true)                          //if the building was selected
            {
                CustomEvents.OnBuildingDeselected(building); //trigger custom event
            }
            if (building.GotoPosition)
            {
                building.GotoPosition.gameObject.SetActive(false);
            }

            base.OnDeselected();
        }