Make Purchases through Apple Store

You can redeem Purchases to specifically the Player and even a Class that the Player owns!

Create In App Purchases on Apple

Navigate to the App Store Connect page, and find Monetization, Underneath you'll find In-App Purchases which is where you will create the Products and find the necessary information.

Create New In-App Purchase Button

As you create a new In App Purchase, you need to pick a Type, a Reference Name and finally a Product ID. Create the Product and save the Product ID to create IAP with LootLocker.

Creating Purchases In Engine

To create Purchases in Unity, you must inherit from IDetailedStoreListener and import the required methods that follows.

This is how you add products to your IAPManager:

Here is how you'd initiate a Purchase:

This snippet shows you how you'll connect LootLocker IAP to the flow:

In this example LootLockerIAPManager.cs has a RedeemPurchase(Product product) method which will be described underneath Redeem Purchase For Player and Redeem Purchase For Class

This is the complete script:

Redeem Purchase For Player

Product is from using UnityEngine.Purchasing;

Which is a Package called "In-App Purchasing", read more here.

Redeem Purchase For Class

Product is from using UnityEngine.Purchasing;

Which is a Package called "In-App Purchasing", read more here.

Last updated