itemId
//will be called by soomla public void OnStoreInitialized() { Debug.Log("store init "); int timesPlayed = 0; if (PlayerPrefs.HasKey("times_played")) { timesPlayed = PlayerPrefs.GetInt("times_played"); } Debug.Log(StoreInventory.GetItemBalance(MashinRunAssets.mashinRunCurrency.ItemId)); if (timesPlayed == 0) { StoreInventory.BuyItem(MashinRunAssets.volksWagenCar.ItemId); StoreInventory.EquipVirtualGood(MashinRunAssets.volksWagenCar.ItemId); } timesPlayed++; PlayerPrefs.SetInt("times_played", timesPlayed); cars = DataManager.GetAllDataFromResourcesFolder <GameObject>("Cars"); Debug.Log("cars.Count " + cars.Count); Debug.Log("cars"); Debug.Log("cars.Count" + cars.Count); camera = Camera.main; }
void OnMouseUp() { try { Debug.Log("attempt to purchase"); StoreInventory.BuyItem("No_Ads_Item_ID"); } catch (Exception e) { this.GetComponent <AudioSource>().Play(); Debug.Log("SOOMLA/UNITY" + e.Message); } }