Follow

Why does integrating Unity IAP result in compiler errors?

Symptoms

  • Integrating Unity IAP result in compiler errors
  • I am getting the error “CS0246: The type or namespace name `IPurchaseReceipt' could not be found”

Cause

You are receiving Errors including "CS0246: The type or namespace name `IPurchaseReceipt' could not be found ... System.Reflection.ReflectionTypeLoadException ... UnityPurchasing/Bin/Stores.dll ... UnityEngine.Purchasing".

These errors indicate Unity IAP has been disabled from the Unity Cloud Services window, or that you are disconnected from the Internet. It could also be an issue with the Plugin.

Resolution
Please try reconnecting to your Internet, then sign into Unity Services and enable Unity IAP, or if necessary Reload (or Close and Reopen) the Services window. See also Setting up Unity IAP.

You can also try the following:

1. delete the plugin folder

2. move your purchase script out of the assets folder

3. Reimport the IAP plug via the asset store or services window.

4. Once fully imported, add your purchase script back into your project.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.