Issue:
- Updating a project to a newer version of the Unity Editor has caused unexpected IAP Package warnings or error messages.
Cause:
Updating a project to a new version of Unity will force the Package Manager to import the latest version of the In-App Purchasing package into the project. This may be newer and contain differences in Initialization from the version used when the project was last built.
There have been numerous updates to the In-App Purchasing package in the last couple of years, they can be viewed in the In-App Purchasing ChangeLog.
Resolution:
If you are using a codeless IAP integration, be sure to check both the Automatic Initialization checkboxes in the Editor > Services > In-App Purchasing > IAP Catalog panel. Doing so will ensure that Unity Gaming Services (a dependency of IAP) is initialized before the IAP system.
If you are using a coded IAP Integration, be sure to Initialize UGS before initializing IAP
await UnityServices.InitializeAsync();
...
UnityPurchasing.Initialize(this, builder);