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

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!

How to Setup, Run and Package MirrorWorld’s Unity SDK demo game
Do not index
Do not index
content plan
keyword
keyword list
topic search volume

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

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#
  1. Have a MirrorWold developer account, register for one here.
  1. Have an API key under your MirrorWorld account, you can learn more about how to create one here
  1. 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
notion image
No the next thing we’re going to do is to double click the “GameEntry” scene or drag it into the left panel
notion image

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
notion image

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!
notion image
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.
notion image
Once you’re done you should be able to see your wallet
notion image

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.
notion image

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
  1. Select “Build Settings”
  1. From the pop up modal, select Android and click the Switch platform button.
notion image
After platform switching is done, you can click on build to start the building process
notion image
Enter your preferred name for the APK and where you want the APK file to be saved and then click save!
notion image
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
  1. Open “MirrorWold” folder
  1. Open android folder
  1. Open the config.txt file
  1. 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
notion image
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.
 

Build your application with Mirror World Smart Platform

 
Read our full deck here. Mirror World Smart Platform now supports EVM-compatible chains!!!
Website | Docs | Github | Youtube | Blog | Twitter | Telegram