public void Sell() //2 DO HERE : BASE ECONOMY INCREASE ON DAY PASSED && IF PET IS DEAD SELL FOR 1$ { shopLogic.IncreaseEconomy(Convert.ToInt32(price.text)); sold.SetActive(true); this.GetComponent <Button>().interactable = false; GameObject aux = shopLogic.actualSoldPets[index].gameObject; Debug.Log("ListCount: " + shopLogic.actualSoldPets.Count); //update shops positions : for (int i = 0; i < roomsLogic.roomsGameobjects.Count; i++) { roomsLogic.roomsGameobjects[i].transform.position = roomsLogic.gridPositions[i]; } roomsLogic.i--; shopLogic.actualSoldPets.RemoveAt(index); shopLogic.actualHoldingPets.RemoveAt(index); Destroy(aux); shop.GetComponent <ShopButtons>().BuyButtonClick(); shopLogic.ShowUIPiece(buttonShop); shopLogic.ShowUIPiece(economy_ui); shopLogic.ShowUIPiece(lockUnlock); shopLogic.CloseShop(shop); shopLogic.ResetSellGameObjectList(); // }