Asset Layer Game Server
Last updated
Last updated
Asset Layer requires using a server for user authentication in order to keep your App Secret secure. The Asset Layer Game Server is an Express server that can be easily configured and deployed to handle all of your Asset Layer needs. You are welcome to extend the Asset Layer Game Server to fulfill all of your game's server-side needs. You can also add Asset Layer functionality to your existing game server using our API and SDK.
You can find the Asset Layer Game Server at this GitHub repo, https://github.com/unbounded-enterprise/asset-layer-proxy-express. You can fork or create a remote repository for your game's server.
Once you've forked ore created a remote repository for your game's server, you can deploy and configure the server through a service such as Heroku. See below for detailed instructions on deploying and configuring your server through Heroku.
Once your server has been configured and deployed, you can add your server's URL to your Unity project settings. You can access the project settings through the Edit menu in the navbar. You'll see a tab, "Asset Layer App Settings". In this tab, there is a field "Proxy Server URL". Enter your server's URL here.
If you don't have a Heroku account, you can sign up for free at heroku.com
Once you are logged in, create a new app. Give your app a name and create your app. You will need to have a payment method on file with Heroku to create your app.
Once your app is created, select GitHub as your deployment method. You'll need to connect your GitHub account to Heroku first.
Once your GitHub account is connected, you will be able to search for your game server's repo. If you plan to make changes to your game server, you can enable automatic deploys so that these changes are pushed to your server automatically from main.
Next, configure your server with your App ID and App Secret. Go to your Heroku app's Settings section and select "Reveal Config Vars". Create two config vars, "ASSETLAYER_APP_ID" and "ASSETLAYER_APP_SECRET". Add your app's app ID and app secret from the App Info page in your dashboard.
You can scroll down to get your server's URL in the Domains section. You can add your server to a domain you own as well.
Now, all you have to do is add your server URL to your Unity project settings. For directions, see the above section. For a video demonstration of this process, see How to Integrate Asset Layer into your Unity Game