Setting Up In-App Purchase Products
This guide will walk you through the process of setting up in-app purchase (IAP) products for your Spot the Difference game's store.
Product Types Overview
Your game includes two main types of IAP products:
Coin Products: These are consumable items that players can purchase to obtain in-game coins.
No Ads Product: This is a non-consumable item that removes ads from the game when purchased.
Locating the Product Definitions
In the Unity Editor, navigate to your Project window.
Go to
Assets >
BlockPuzzleGameToolkit> Resources > ProductIDs
.Here you'll find the product definitions for your IAPs.
Coin Products Setup
You have multiple coin products available:
CoinsProduct1
CoinsProduct2
CoinsProduct3
CoinsProduct4
For each Coin Product:
Select the product in the Project window.
In the Inspector, you'll see the following settings:
Id: The unique identifier for the product (e.g., "CoinsProduct1")
Product Type: Set to "Consumable"
Example for CoinsProduct1:
Id: CoinsProduct1
Product Type: Consumable
No Ads Product Setup
To set up the No Ads product:
Select the "NoAds" product in the Project window.
In the Inspector, configure the following:
Id: Set to "noAds"
Product Type: Set to "Non Consumable"
Best Practices
Unique Identifiers: Ensure each product has a unique Id that matches the identifier in your app store console (Google Play Store, Apple App Store, etc.).
Consumable vs Non-Consumable: Double-check that coin products are set as "Consumable" and the No Ads product is set as "Non Consumable".
Naming Convention: Maintain a clear naming convention for easy management, especially if you plan to add more products in the future.
Version Control: Keep these product definitions under version control to track changes over time.
Integration Steps
Store Integration: Ensure your game's store UI references these product Ids correctly when initiating purchases.
Purchase Validation: Implement proper purchase validation logic in your game to verify and process these products when purchased.
Store Listing: Update your app store listings with the corresponding product information, ensuring the Ids match exactly.
Technical Note
These product definitions are used by Unity's IAP system to manage in-app purchases. Make sure you have the Unity IAP package installed and properly configured in your project.
By following this setup, you'll have a structured system for managing in-app purchases in your Spot the Difference game, allowing players to buy coins and remove ads seamlessly.
Last updated