- Integrating Unity IAP result in compiler errors
- I am getting the error “CS0246: The type or namespace name `IPurchaseReceipt' could not be found”
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.
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.