Есть ли способ или стратегия, чтобы понять, когда ProcessPurchase был вызван из элемента восстановления?Unity IAP идентифицирует Восстановленный элемент метода ProcessPurchase
Я ищу как для Ios и Google
Есть ли способ или стратегия, чтобы понять, когда ProcessPurchase был вызван из элемента восстановления?Unity IAP идентифицирует Восстановленный элемент метода ProcessPurchase
Я ищу как для Ios и Google
ли здесь: 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.
}
});
}
Я надеюсь, что это может помочь: 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);
}
Это стандартный реставратор re process ... Я спрашиваю о том, как вызывается ProcessPurchase для восстановления элемента ... – Klamore74