static void OnClickEvent(ClickEvent e) { if (e.LayerClicked(InputLayer.UI)) { return; } if (e.left && !e.LayerClicked(InputLayer.MobileUnits) && !e.LayerClicked(InputLayer.StaticUnits)) { Unselect(); } }