Hello,
I use the IAPDemo.cs from Sample IAP Project.
I would like to add some visual effects when player buys the inapp first time. If he already bought the inapp or press the restore button I would like not to play the visuals. I have some problems in understanding below scenarios.
iOS:
I have bought several non-consumable inapps on my first device. On my second device I try to buy the inapp which I have already bought on my first device. I will probably get the information that I already bought it. Will the UnityIAP restore this inapp and all others (will it call restore method same as I pushed programmed restore button?) or only the one I tried to buy again? How can I reach the information that this purchase is not a first one but “repeated”?
Next question is regarding to restore process. I would like to inform my game that the restore process has started and finished. If I fire a restore purchases button, I would like to setup a bool flag that the restoreProcess is started (is there any callback on restore start?) → go through purchase process of all bought inapps → set restoreProcess to false in OnTransactionsRestored method?
Android:
As far as I understand I can setup a flag in the Awake method (where the UnityIAP is initialized in the Sample IAP Project). All already bought inapps will get restored and then the OnInitialized method gets called and I can setup the flag to false?