Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I keep getting an error saying StandardPurchasingModule' does not exist in the current context?

Tags:

c#

unity3d

I am trying to do a tutorial from unity (https://unity3d.com/learn/tutorials/topics/analytics/integrating-unity-iap-your-game?playlist=17123) and I copied the code from here. However, I keep getting an error saying: The name `StandardPurchasingModule' does not exist in the current context

I can't figure out why this keeps happening. This is line I am getting the error on

var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
like image 999
I. Jones Avatar asked Jan 27 '17 02:01

I. Jones


Video Answer


3 Answers

It seem you need to install the Unity IAP by your own. Unity might skipped that step or you accidentally skipped it. who knows.. hahha

To fixed it, just go the folder 'UnityPurchasing' folder in 'Plugins' folder. Then double click on the package Unity IAP. Import all and the problem solved. If it does fix your problem just try Dong Nguyen solution.

like image 184
Evynner EE Avatar answered Oct 20 '22 16:10

Evynner EE


I have same problem. I think this bug of unity. It not import all libarary we need, And I resolved. I create new unity project, enable Unity Purchasing, and then I copy folder Plugins/UnityPurchasing of new project to problem project.

like image 6
Dong Nguyen Avatar answered Oct 20 '22 15:10

Dong Nguyen


You need install plugin after import Unity IAP. Look where is installer.

P.S. If you have errors after install plugin, you need delete demo scene and demo scripts.

like image 4
Abs3akt Avatar answered Oct 20 '22 14:10

Abs3akt