I'm using soomla package for in-app purchasing and I met a strange error to build my game, and it is very difficult to solve for me.
In the callback function OnMarketPurchase, I call this code.
public void OnMarketPurchase(PurchaseableVirtualItem pvi, string payload, Dictionary<string,string> extra){
if(pvi.ItemId == "purchaseable_item_id"){
GlobalScript.setLiteVersionFlag();
if(GoogleADS!=null)
GoogleADS.SendMessage("DestroyBanner");
Application.loadLevel("GameScene1");
}
}
In here, GoogleADS is a gameobject that is published on Start() function.
I could see the result of GlobalScript.setLiteVersionFlag() and GoogleADS.sendMessage.
But, loadlevel is not working. I don't know why this happens?
You have not shared the complete code, so I can only guess -
if(pvi.ItemId == "purchaseable_item_id") is not evaluating as trueOnMarketPurchase is not getting calledGameScene1 is named incorrectlyGameScene1 has not been added to "Scenes in build"If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With