void Buy() { print("Buying process"); int price = System.Int32.Parse(this.transform.Find("Skin Price"). GetComponent <UnityEngine.UI.Text>().text); int playerGems = saveLoadData.LoadCount(true); if (playerGems >= price) { saveLoadData.SaveSkinData(skinName, skinNumber, true); isAvailable = saveLoadData.LoadSkinData(skinName, skinNumber); saveLoadData.SaveScore(-1, -price); this.transform.Find("Skin Price"). GetComponent <UnityEngine.UI.Text>().text = "Use"; } else { print("not enough money"); } }