/// <summary> /// Called when deselecting this item via the deselectButton. /// <summary> public void Deselect() { //hide the deselect button and 'selected' state deselectButton.SetActive(false); if (selected) { selected.SetActive(false); } //tell our checkbox component that this object isn't checked if (selCheck) { selCheck.isOn = false; } //tell our ShopManager to change the database entry accordingly ShopManager.SetToDeselected(this); //re-show the select button selectButton.SetActive(true); }