是否有方法或策略来了解何时从还原项调用ProcessPurchase?
我正在寻找iOs和Google
答案 0 :(得分:0)
在这里: https://docs.unity3d.com/Manual/UnityIAPRestoringTransactions.html
/// <summary>
/// Your IStoreListener implementation of OnInitialized.
/// </summary>
public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
{
extensions.GetExtension<IAppleExtensions> ().RestoreTransactions (result => {
if (result) {
// This does not mean anything was restored,
// merely that the restoration process succeeded.
} else {
// Restoration failed.
}
});
}
答案 1 :(得分:0)
我希望这可以提供帮助:https://unity3d.com/cn/learn/tutorials/topics/analytics/integrating-unity-iap-your-game
相关代码,来自代码示例:
public void BuyNonConsumable()
{
// Buy the non-consumable product using its general identifier. Expect a response either
// through ProcessPurchase or OnPurchaseFailed asynchronously.
BuyProductID(kProductIDNonConsumable);
}