Configuring for CloudMoolah Moo Store
Defining products

Codeless IAP

Codeless IAP is the easiest way to integrate in-app purchases in your Unity app. This allows you to use Unity’s GUI and avoid directly using the Unity IAP API for a basic IAP integration. Note that you can access extended functionality through the through scripting - see Accessing Unity IAP’s extended functionality below.

For further information and the opportunity to give feedback and ask questions, visit the Unity IAP forums.

Using Codeless IAP

Add IAP Buttons to your app and define your products in the IAP Catalog. When players run your game, the Unity Purchasing system is configured based on the products you entered in the catalog. When a player taps or clicks on an IAP Button, it initiates a purchase of the associated product.

Setup

Image A: Inspector for a Button with the Codeless IAP component
Image A: Inspector for a Button with the Codeless IAP component
  1. To add an IAP Button to your scene, in the Unity Editor menu, select Window > Unity IAP > Create IAP Button.

  2. Select the new IAP Button, locate the IAP Button component in the Inspector (see image A, above), and click the AP Catalog… button to open the IAP Catalog window (see image B, below). Alternatively, in the Unity Editor menu, select Window > Unity IAP > IAP Catalog.

  3. Define a product ID for your IAP product. This ID identifies your product with the app stores. Note that you can override this ID with a unique store-specific ID through the Advanced option.

  4. Choose a product Type. Products can be consumable, non-consumable, or subscription.

  5. Select your IAP Button again in the scene, and locate the IAP Button component in the Inspector (see image A, above).

  6. Choose the product from the Product ID pop-up.

  7. Connect the On Purchase Completed Event to a method that provides purchase fulfillment.

  8. Run your game and click on your IAP Button to test the purchase.

Image B: IAP Catalog editor for defining and exporting products
Image B: IAP Catalog editor for defining and exporting products

Advanced

Advanced fields customize a product with store-specific detail. You can fill out the advanced fields to provide a title and description for your IAP products, override a product’s ID for a particular store, and provide pricing information. After providing this information, you can export the catalog.

Export

After customizing your products with store-specific detail, you can export the entire catalog as a CSV file to upload to Google Play or a text file for import through Apple’s Application Loader to the iTunes Store.

Accessing Unity IAP’s extended functionality

None of Unity IAP’s extended features are exposed through the Codeless IAP feature. This includes non-consumable purchase restoration for the Apple App Store. However, you can edit the source for IAPButton.cs and access the Unity IAP IStoreController and IExtensionProvider instances, returned by IStoreListener.OnInitialize, to access Unity IAP’s extended functionality. Codeless IAP is an implementation on top of the Unity IAP API and much of Codeless functionality is exposed for developer augmentation.

Configuring for CloudMoolah Moo Store
Defining products