In this guide, we're doing a quick rundown of how to add your game to AccelByte Launcher and log in using the launcher. This guide is Unity specific, however, the flow is identical in any other SDK.
You can grab our SDK from our public GitHub: https://github.com/AccelByte/accelbyte-unity-sdk
AccelByte Launcher accommodates users to access the store and download items from the store listing. Once the user is logged in on AccelByte Launcher, they do not need to login on the game.
Login From Game-Client Launcher
The implementation of logging in via launcher is as simple as calling one function to handle it. The auth code, that is generated from AccelByte Launcher executable, is used for the login authorization.
Embedded below (Figure 1) is the logic code for:
- Login with launcher function, and
- Login with launcher callback
This function can be called right before the login menu with username and password shown if somehow the login process with AccelByte Launcher fails. We can show the username and password on the login menu.
To top it off, we need to set the AccelByte SDK config. Make sure all the config value is valid.
Next, we build the game for windows desktop. From File >> Build Settings >> Choose Target Platform : “Windows” Arch : “x86_64” Build, then click on Build Button.
*note that if we are building Android build using Unity 2019, then we need to set the API Compatibility Level to “.NET 4.x“
That concludes the implementation on the game side.
Setting Up Store on Admin Portal
After you've uploadad your game and set it as the current version, the next step is to set it up for store listing. First off, go to the admin portal and while you're in Publisher namespace, select E-Commerce >> Stores menu.
To update the existing store items and settings, from the store menu action list, clone the existing store to make a draft store so that all the contents are copied to the clone version. We edit the draft store afterwards by clicking the view action.
If you plan to replace the store instead of updating, you can just create a new store and proceed on adding the item details.
On Store edit menu, change tab to Items then click the create items button. Fill in the game title in Item Name field, select App for the Item Type, and Game for the App Type. App ID will be used to upload the game - in this example, we fill in “lightfantastic” as the ID, the same name as the game title.
Purchase Limit is the limit to how many of this item can be purchased from the store. We also have the options to the namespace currency and the currency code, which we suggest you to use the publisher namespace for this (we are using AccelByte as the publisher namespace and US currency).
Using Build Utils to Upload Your Game
Please refer to this document below:
Checking Out The Game From Launcher
At this point, we are can get the game from the store as a player. Create account and get the launcher from Accelbyte Player Portal https://demo.accelbyte.io/player, install the launcher on your computer, run it and log in using the player account that you've created.
The version of the game depends on which version of the game you set as the ‘current version’ on the admin portal.
If you have any questions regarding this guide, please contact us through email at firstname.lastname@example.org.