I am authoring a package installed via Package Manager. This package follows best practices with the runtime containing an asmdef
I want this package to have interactions with Unity IAP. I therefor need to be able to do the following:
- Add Unity IAP as a dependency to package.json
- Add Unity IAP as a dependency in the asmdef
I cannot find any documentation on either of these points specifically as it pertains to Unity IAP. It is notably not present in the Package Manager and only seems to be available via Services which has the effect of updating your local manifest.json. I do see that turning it on adds the following:
“com.unity.purchasing”: “2.0.3”,
I have added this to my package.json, yet I still get an undefined namespace for this line:
using UnityEngine.Purchasing;
I cannot place this outside into a directory not under asmdef (not least of which means the package ignores it for lacking an asmdef). So what do I do? How do I successfully configure my package in such a way that I can reference UnityEngine.Purchasing?