Skip to main content
Answer

Purchase process in Unity3D SDK

  • August 1, 2023
  • 2 replies
  • 218 views

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)

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+7
  • Author
  • Helper
  • 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
  • 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)