Hi, so I’m having a very hard time setting up UDP In App Purchases in place. I’m currently at the step when I can download my repacked builds to test them on my devices before publishing and I can’t see my in app products when testing the repacked build on my devices, which makes me believe it’s something related to my current configuration, so I decided to start over the UDP setup.
This is my current configuration:
Unity: 2020.1.3f1
OS: MacOS Mojave 10.14.5
My 12 products are set in the default IAP Catalog, which has the “Auto-Init” option turned off, we manually initialize them like this:
public void InitializePurchasing()
{
// If we have already connected to Purchasing ...
if (IsInitialized())
{
// ... we are done here.
Debug.Log("[InitializePurchasing] Already initialized, skipping");
return;
}
// Create a builder, first passing in a suite of Unity provided stores.
var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
var catalog = ProductCatalog.LoadDefaultCatalog();
foreach (var product in catalog.allValidProducts)
{
if (product.allStoreIDs.Count > 0)
{
var ids = new IDs();
foreach (var storeID in product.allStoreIDs)
ids.Add(storeID.id, storeID.store);
//Add
builder.AddProduct(product.id, product.type, ids);
}
else
{
//Add
builder.AddProduct(product.id, product.type);
}
}
// Kick off the remainder of the set-up with an asynchrounous call, passing the configuration
// and this class' instance. Expect a response either in OnInitialized or OnInitializeFailed.
UnityPurchasing.Initialize(this, builder);
}
1 - The game was designed to have IAPs in Google Play, so we enabled them on Project Settings → Services → In-App Purchasing
2 - After enabling them, we imported the Unity IAP from that very same settings page by clicking on the “Import” button
3 - Downloaded the In App Purchasing package version 2.0.6 (also, why there is have to be two different packages for implementing IAPs?)
4 - At this point, when clicking on Unity’s Window menu we can only see the option “Unity IAP” and not “Unity IAP and Distribution Portal” as stated here: UDP via Unity IAP | Unity Distribution Portal | 1.2.0
I believe this is because, as stated by @nicholasr in the last Unity IAP release notes post ( Unity IAP package 4.12.2 is now available page-2) the UDP package is no longer installed as a prerequisite, quote:
…
- UDP package is no longer installed as a prerequisite
…
- UDP - if not installed or up-to-date, a menu will prompt you to install or update it upon selecting UDP support features.
5 - So, the ‘Getting started’ guide says it clear: “Do not mix implementations!” (Don’t mix the implementations | Unity Distribution Portal | 1.2.0). How can we follow the very clear instructions to only choose one option (UDP Package or Unity IAP) if we need to manually install yes or yes the UDP package in order to be able to set all this up.
Thanks for the help but I find the documentation misleading, contradictory or perhaps I can’t find the latest updated documentation for the new versions of the packages.