How to Setup, Run and Package MirrorWorld’s Unity SDK demo game

Sonic (by Mirror World)
4 min readSep 20, 2023

Intro

A lot of times, people find it difficult to set up, configure, run and compile our Unity SDK Demo Game and in this article I’ll walk you through how you can get everything up and running in no time!

Prerequisite

  1. Basic knowledge of Unity and C#
  2. Have a MirrorWold developer account, register for one here.
  3. Have an API key under your MirrorWorld account, you can learn more about how to create one here
  4. Download the latest SDK release here

Setup

The first thing we are going to do is to open the just downloaded project in Unity and adjust the SDK configuration and to do that we are going to open up the project in Unity.Should look like this

No the next thing we’re going to do is to double click the “GameEntry” scene or drag it into the left panel

Configure

Before we run the game, we need to update the SDK configuration by selecting the MirrorSDK on the Hierarchy and then go the panel on the right hand side and then enter your API Key, Environment, Chain and Debug Email which is the email used in creating your MirrorWorld Account

Play

Amazing job so far! Now the next thing we’re going to do is to hit the “Play” button at the top bar and watch the demo game come to live!

Cool!, we can now proceed to click the login button and that should take you to your default browser for you login using your email.

| Please note that for debugging purposes you’ll have to login with the same email address you entered in the configuration stage and that should also be the same email address that is attached to your APIKey but as soon as you bundle your game, you and your user’s can sign in with any email of your choice.

Once you’re done you should be able to see your wallet

Do your thing!

Here you can go ahead and do your thing! explore the game, adjust the code or even the design and test out changes.

Package

The next thing which is most likely the last thing is to package the app so that you can share it with people who want to play the game!

Android

To package the android APK you’re going to need to

  1. Click on “File” from menu top bar and then
  2. Select “Build Settings”
  3. From the pop up modal, select Android and click the Switch platform button.

After platform switching is done, you can click on build to start the building process

Enter your preferred name for the APK and where you want the APK file to be saved and then click save!

You’re going to be required to enter a password but don’t worry, I’ll show you where you need to get the password!

  1. Open your file system explorer and navigate to the DemoGame root folder
  2. Open “MirrorWold” folder
  3. Open android folder
  4. Open the config.txt file
  5. Copy the password value

Player Settings

Click on player setting, expand publishing settings, enter the the password you copied into the password input fields and then close the modal

Click build again and enter your preferred app name and hit the “Save” button!

Wait

At this point you’ve done a great job and all you have to do is to wait for your APK file to be generated and once it is done you can find it in the location you choose to save it.

Summary

In this article, we looked at how to setup, configure, run and compile MirrorWorld’s Unity SDK Demo game in easy to follow steps. If you run into any issue at all following the steps above please reach out to us un Discord or Telegram, we’ll be more than happy to help you out.

--

--