Berry Match-Three: Setup In-App Purchases

For the first you need to create new application in the Google Play Developer Console
 
Image
Write name of the future game and press “Prepare Store Listing”
Image
Now you need to click “Services & APIs” button. Click Image button if you can’t find it.
Image
There you will find very long license key, which called LICENSE KEY FOR THIS APPLICATION. Just select it and copy in the clipboard (Ctrl + C)
Image
Go to the Unity. Open there Berry Match Three asset. And open the main scene /_Yurowm/Match-Tree Engine/Scenes/Game.unity
After that click go to Window -> Services
 Image
You will see the Services window. There can be a message that you are offline on not logged in.
 Image
You need to click “Sign in” and enter you login and password of your Unity account. After you do that, there will be an attention that you have not access to the dashboard. You need to click “New link” for linking this project to your dashboard.
 Image
Select one of your organization, and click “Create”.
Image
 After you create new Project ID you will see the main services page.
Image
You need to turn on Analytics and In-App Purchasing services.
Make sure that these services have the “ON” blue toggle.
 Image
Now you need to set up the Dashboard. Click on “Go to Dashboard” to open the Dashboard.
 Image
There you need to ckick on “Go to Analytics”
 Image
And click on “Gear” button on your project
 Image
There in the Google API Key field you need write your LICENSE KEY from Google Play Developer Console.
 Image
Now you need to click “Save” button, and you may close this page.
First step is done!
Now you need to come up with four SKU keys for in-app products. You may use default which I came up with, but I want you to know, where you can write your owns.
Find and select Core object in the scene hierarchy.
 Image
In the inspector panel you need to find Berry Store Assistant component. And there you need to click on IAPs button. You will see small table with four ID and SKU.
I don’t recommend you to change ID. Its used in the code, so if you will change it, you will get some errors, when you will run the application.
You need to write your own SKU for each ID and to remember it. Or leave everything as it is, but don’t forget, what here is written.
 Image
Now you need to submit this application in Developer Console, but for the first the application must be signed.
Press File -> Build Settings. Choose Android and press “Switch Platform” button if this button is active.
Press Player Settings and you will see Player Settings panel in the Inspector view.
Write there your unique Bundle ID
 Image
In the Publisher Settings area you need to choose “Create New Keystore” toggle, and click “Browse Keystore” button. Choose path and file name for saving your keystore. Don’t miss this file, otherwise you will not able to update your game anymore.
 Image
Come up with new password and confirm it.
 Image
And now you need to create new key for this keystore. Click on the Alias popup field and choose “Create a new key”
 Image
In the opened window you need to fill “Alias” and “Password” fields. And click “Create Key” button, when it will be active.
 Image
Choose your new key alias and enter the password.
 Image
Now it should be ready to compile. Just press “Build” button in the “Build Settings” windows. And choose path where you want to save it and file name of APK file.
 Image
When compiling process will be finished, you will have an APK file with your game. Now you need to submit it in the Develpoer Console.
 Image
Open the Developer Console and press APK button.
 Image
Press “Upload your first APK to Production” button and choose your APK file.
Image
Now wait until file will be uploaded.
 Image
After it will be finished, you will see app details
 Image
Now you need to create in-app products in the Google Play Developer Console. Click there on the “In-App Products” button.
 Image
Click “+ Add new product” and write one of your SKU keys. Choose “Managed” product type and click “Continue”.
 Image
Fill all nesseccery fields and after that click “Activate”
 Image
Now press “Back” button
Image
And add another three product using the same method.
It should looks like this
 Image
That is all.
You will need to complete all required pages before you will publish this app.
After you publish it, in-app purchases in the game will work.

Leave a Reply

Your email address will not be published. Required fields are marked *