Unity In App Purchases (IAP) Complete Tutorial 2021|Monetize Your Game

Опубликовано: 30 Сентябрь 2024
на канале: tutorialsEU
37,918
692

🎮 Unity Masterclass - Master game development by building enjoyable games from scratch: https://bit.ly/3YJWe0N

In this video you will learn how to integrate in app purchases to your Unity project.

Check out the full article and get the code here: https://bit.ly/3yZcmhC

In this Unity tutorial, we will cover in-app purchases (IAP) and how to create them. This tutorial is for the complete beginner who has never created an app before, or those of you who have had some experience but want a more detailed overview of all the steps involved.

The Unity IAP plugin enables your game to sell virtual goods within the app itself. You can also use it to offer subscriptions, as well as "lite" versions that users can purchase from outside of the app via Google Play or iTunes App Store if they are on iOS devices.

A Unity IAP plugin is just a small script that we have to attach to our objects. There are also scripts for handling the purchase of these items, as well as the receipt and storing of virtual currency like Gold or Coins.


How to use in app purchases in Unity
How to deactivate ads with in app purchases
How to add additional features like adding in app money or in app paid features
How to add manager that will collect money in the game


To do this we first need to enable the IAP (In App Products) in the project settings, then we need to upload a build to the play store so we can add products.

Before we upload the game to the play store we need to first sign the application using a key-store.

This key is proof that we are the owners or developers of this game.

We will need this key whenever we want to upload a new version to the store.

But before we do that we need to tweak few settings because.... play store rules!.


we will be creating an in game store to sell stuff to the player :)
First let's create an in game store UI

Now that we have our Buttons ready we only need to program our button event's which will be executed if the purchase operation was done successfully.

For that create a new gameobject called "Store Manager".

Create and Attach a new script to it named "StoreManager".


tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: https://goo.gl/rBFh3x