I am using Unity 5.3.1p1 for testing Unity IAP’s on windows 10 universal app and on application launch I am getting this exception in visual studio
An unhandled exception of type ‘System.AccessViolationException’ occurred in UnityEngineProxy.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I have found that issue is in Initialisation call because everything works fine without initialisation of IAP’s.
I am using these lines to initialise
public void InitializePurchasing()
{
// If we have already connected to Purchasing …
if (IsInitialized())
{
// … we are done here.
return;
}
var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
builder.AddProduct(kProductIDConsumable, ProductType.Consumable);
// Continue adding the non-consumable product.
builder.AddProduct(kProductIDNonConsumable, ProductType.NonConsumable);
builder.AddProduct(kProductIDSubscription, ProductType.Subscription, new IDs(){
{ kProductNameAppleSubscription, AppleAppStore.Name },
{ kProductNameGooglePlaySubscription, GooglePlay.Name },
});
//UnityPurchasing.Initialize(this, builder);
}