Skip to main content

How should purchasing process looks like in Unity3d? 

 

In official docs Unity (revenuecat.com) we see only single function for this purpose:

public void BeginPurchase(Purchases.Package package)

 

I think it’s definetly lack of documentation. How should we obtain Purchases.Package object? Create it from new on our own? Get it somehow and store it?

Ok I think the right process is to fetch offerings, get current offering and store it in some variable. Then just get packages from current offering and use it as an argument for the PurchaseProduct function.

 

I think it’s good to add such info in docs. Or at least make docs in github so anyone can pull request addition to them.


> Or at least make docs in github so anyone can pull request addition to them.

We have added our docs to github and will be making them public soon 👀

 

And yes, that is how to fetch the packages. We have that in our general instructions here: https://www.revenuecat.com/docs/displaying-products#fetching-offerings (which also has some Unity code if you’d like)

 


Reply