In this guide, we're doing a quick rundown of how to add your game to AccelByte Launcher and log into the Launcher. This guide is Unity specific, however, the flow is identical in any other SDK.
AccelByte Launcher enables users to access the store and download items from the store's catalog. Once the user is logged in to the AccelByte Launcher, they do not need to log in to the game.
Game Implementations
Log in from Game Client
The implementation of logging in via launcher is as simple as calling one function to handle it. The auth code, that is generated from the AccelByte Launcher executable, is used for the login authorization.
Embedded below is the logic code for: - Login with launcher function, and - Login with launcher callback
This function can be called right before the login menu is 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 of the config values are valid.
Next, we build the game for Windows desktop. From File, go to Build Settings, then Choose Target Platform: “Windows” Arch: “x86_64” Build, then click the Build Button.
*note that if we are building for Android using Unity 2019, we need to set the API Compatibility Level to .NET 4.x
Figure 3. Unity Build Configuration
That concludes the implementation on the game side.
Setting Up a Store in the Admin Portal
After you've uploadad your game and set it as the current version, the next step is to create the store and catalog. First off, go to the Admin Portal. In the Publisher namespace, select E-Commerce and open the Stores menu.
Figure 4a. Stores menu in the Admin PortalFigure 4b. Admin Portal's Store Overview
To update the existing store items and settings, first clone the existing store to make a draft store so that all of the contents are copied to the clone version. You can clone a store by selecting Clone in the store Action list. We can 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 add the item details.
Figure 5. Store OptionsFigure 6. Store Cloning from Published Store to Draft StoreFigure 7. Draft Store - Edit Option
In the store's Edit menu, open the 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. The App ID will be used to upload the game. In this example we've typed lightfantastic as the ID, the same name as the game title.
Purchase Limit determines how many of this item can be purchased from the store by a single player. We also have options to choose the namespace currency and the currency code. We suggest you use the publisher namespace for this (we are using AccelByte as the publisher namespace and US currency).
Figure 8. Draft Store Item ListFigure 9. Draft Store - Add Item
At this point, the game is already available in the store for players to purchase. To see the game in Launcher, first create an account and download Launcher from the Accelbyte Player Portal https://demo.accelbyte.io. After installing Launcher on your computer, log in using the player account that you've created to see your game.
Figure 10. AccelByte LauncherFigure 11. AccelByte Launcher - StoreFigure 12. Claim the Light Fantastic Game from the StoreFigure 13. Light Fantastic is added to the AccelByte Launcher Library
The version of the game will reflect the version you set as the current version in the Admin Portal.
If you have any questions regarding this guide, please contact us via email at support@accelbyte.io.