Skip to main content
Solved

Purchase process in Unity3D SDK


Forum|alt.badge.img+7

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?

Best answer by Ryan Glanz

> 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)

 

View original
Did this post help you find an answer to your question?

2 replies

Forum|alt.badge.img+7
  • Author
  • Helper
  • 7 replies
  • August 2, 2023

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.


Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 364 replies
  • Answer
  • August 3, 2023

> 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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings