Version

DarkMatter 4.0.0

Overview

The StoreFront is a library used to create a dynamic store for your game. You define the products your game supports along with what they cost and what they give when purchased. Products can cost real money, or any number of virtual currencies, and can reward multiple different items and/or currencies. For example, a “Demon Armor Pack” product could cost 20 diamonds, 5000 gold coins and give you the Demon Sword, Demon Armor, and 3 Demonize Potions. Another example is a “One-Time Offer Bonus Starter Pack” product that costs $9.99 and gives you 3 heavy tanks, 10 light tanks, and 5000 credits. It’s common to define “on sale” versions of existing products, where a sale could be a lower price or an increased return.

Along with the products, you also define your stores. A store is a set of states with there always being at least one “default” state. Each state consists of a list of the products visible during that state. For example, a “Half Off” state containing the half-price sale versions of the products in the default state. A state can also contain additional metadata for you to use in setting up your store in game visually such as marking which product has the “Best Value” or “Most Popular”.

Lastly, you can optionally define set times for when your store states are active using Chronos timers. You specify the Chronos timer name you wish to use for a given store state and configure the timer for the times you want it active, such as every weekend in May (visit the Chronos documentation for more details). The default state of a store is active when there are no other states active.

All of this configuration information is dynamic and can be changed at any time, even while the game is live, for each version of the game.

How to Set Up the StoreFront

Step 1:

First you’ll need to set up your Unity project for Unity IAP by following this guide here: http://docs.unity3d.com/Manual/UnityIAPSettingUp.html

Step 2:

Define your products and stores using the Manifest as specified here.

At this point you should be able to use the Unity Editor to test your products, but in order to see your products on a device you’ll have to set up the products on the iTunes and/or Google Play stores. Note, changes to the native stores may require some time before they take effect.

Troubleshooting

Android Purchases

Ensure that your IAP products are set up on the Google Play Developer Console and are active. (Google Documentation suggests that these changes may require up to 24 hours before they take effect.

Upload your APK and publish it as an alpha or beta APK. (This step can take several hours)

Download your build from the Google Play store using the link given to you in the previous step.

After doing that you should be able to make updates to your app and side-load a release signed APK of your game as opposed to re-publishing it and downloading it from the Google Play store as long as you use the same build version as the uploaded APK.