Skip to main content

1. Introduction

Build unity game introduction

Last updated: May 21, 2024

💡Unity Video series
We also offer a video tutorial series on building a game with Unity if you prefer visual learning.

In this tutorial, we'll walk you through the process of seamlessly integrating Immutable zkEVM into your existing Unity game. By following these steps, you'll unlock the potential of blockchain technology within your game, allowing players to truly own in-game assets.

As an example, we'll use a Unity game called "Immutable Runner", a customised version based on the Unity Runner game template. In this game, the player takes on the role of an adventurous fox who must collect Immutable coins and food while avoiding obstacles like trees and bears to reach the finish line.

What makes this game unique is that the fox and Immutable Runner coins will be represented as NFTs (ERC721) and ERC20 tokens, respectively. This means that players can own these digital assets. Moreover, players can use the Immutable Runner coins they have collected to create or craft new skins for their fox. These skins will also be represented as NFTs, further enriching the player's ownership experience.

Throughout the tutorial, we'll walk you through integrating Immutable zkEVM using our Unity SDK, ensuring a secure connection to the blockchain. However, as our current Unity SDK does not support minting, we'll also guide you on how to mint assets using a simple Node server that leverages our Typescript SDK.

As part of the tutorial, you will enhance the game by:

  • Adding Immutable Passport login and logout functionalities.
  • Setting up wallets for players to hold digital assets.
  • Minting a fox NFT for new players.
  • Minting collected Immutable Runner coins to players.
  • Allowing players to create or craft new skin NFTs for their fox using their Immutable Runner coins.

What you’ll learn

What you’ll need before starting this tutorial

  • Basic Unity knowledge: Familiarity with Unity's interface, creating and managing scenes, working with game objects, and basic scripting in C#.
  • Basic Web3 concepts: Understanding of blockchain technology and wallets.
  • Visual Studio or Visual Studio Code
  • Yarn
  • Unity version 2021.3.26f1
  • An active Unity license (a free personal license can be used)

IMX Whitepaper IMX Tokenomics Block Explorer Careers Contact Us