hi.
my project use Unity version 2019.3.15, IAP version 2.2.7.
processPurcharse funtion is not called when restart app after return PurchaseProcessingResult.Pending.
finded MethodAccessException at logcat when UnityPurchasing.Initialize called after restart app.
error code.
1614908252.844 9555-9555/? E/Unity: MethodAccessException: Method `UnityEngine.Purchasing.Product..ctor(UnityEngine.Purchasing.ProductDefinition,UnityEngine.Purchasing.ProductMetadata,string)' is inaccessible from method `UnityEngine.Purchasing.GoogleFetchPurchases.FillProductsWithPurchases(System.Collections.Generic.IEnumerable`1)'
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_throw_method_access(intptr,intptr)
at UnityEngine.Purchasing.GoogleFetchPurchases.FillProductsWithPurchases (System.Collections.Generic.IEnumerable`1[T] purchases) [0x00073] in :0
at UnityEngine.Purchasing.GoogleFetchPurchases+<>c__DisplayClass6_0.b__0 (System.Collections.Generic.List`1[T] googlePurchases) [0x00001] in :0
at UnityEngine.Purchasing.GoogleQueryPurchasesService.HandleOnQueryPurchaseReceived (System.Action`1[T] onQueryPurchaseSucceed, System.Collections.Generic.List`1[T] googlePurchasesInSubs, System
step is very simple
1. google login, IAP init.
2. item Purchase, ProcessPurchase funtion return PurchaseProcessingResult.Pending.
3. restart app after force quit app.
4. google login.
5. logcat error after called UnityPurchasing.Initialize.
when state Pending, isn't it called ProcessPurchase after UnityPurchasing.Initialize?
↧