Sovrun Docs 2025
  • INTRO TO SOVRUN
    • Introduction to Sovrun
    • Autonomous Worlds
    • About Sovrun
      • Sovrun Genesis
      • Sovrun Labs
      • Sovrun Nexus
      • Case Study: Eve Frontier
      • Case Study: Plunder Quest
      • History of Sovrun (BreederDAO)
  • The SOVRN Token
    • About $SOVRN
    • Token Utility
    • $SOVRN Tokenomics
    • $SOVRN on EVM Chains
      • Ethereum
      • Hyperliquid
        • Network Info
          • Block Explorer
          • Acquiring test SOVRN
        • Sessionchains
      • Base
      • BREED to SOVRN Migration
  • Build with Sovrun
    • Chain Tactics
      • Who is Chain Tactics for?
      • Why Mod Chain Tactics?
      • Headless Client
      • Sovrun SDK
      • Game Phases
      • Game Mechanics
      • Game Architecture
      • Expanding Chain Tactics Across EVM-Compatible Chains
      • Chain Tactics Development Roadmap
      • Terminology
      • Getting Started Guides
        • Chain Tactics Local Development & Headless Client
        • Lightweight Unity Client
        • Chain Tactics Modding Tutorials
        • Troubleshooting Chain Tactics Local Development
    • ReadyGamer
      • Joint Venture
      • Services
      • Architecture
      • GAME Framework
      • ReadyGamer API
      • Integration Workflow
      • Roblox Integration
        • Roblox Demo Game - Carnival AI
        • AI Agent NPC's
        • Roblox AI Agent Module
          • Getting Started
          • Module Components
          • Creating a Smart NPC
          • Creating a Continuous Behaviour Script
  • More
    • Sovrun Website
Powered by GitBook
On this page
  1. Build with Sovrun
  2. Chain Tactics
  3. Getting Started Guides

Lightweight Unity Client

Sample Implementation using Unit

PreviousChain Tactics Local Development & Headless ClientNextChain Tactics Modding Tutorials

Last updated 9 days ago

A Unity-based client showcases frontend integration:

  • Prerequisites: Unity version requirement 2022.3 or higher.

Installation:

  1. You can either clone or download the zip.

  2. With Unity version 2022.3.58f1, open the project folder chain-tactics-unity-client. Once you open the project, you can open a SampleScene which you can either duplicate or replace the content of. It is located at: Assets/Scenes/SampleScene.unity

  1. The scene contains a _WorldSettings prefab which is what you need to connect to the backend.

  2. WorldSettings prefab can be found in Prefabs/Core/ folder which you can drag and drop in your hierarchy.

  3. WorldSettings configuration:

If you are developing your own mod, you can set connection type to development.

To create a new CT connection context, you can do the following steps:

  • Right-click on the project folder, select Create > Chain Tactics > New Server Connection Configuration.

  • You can configure CT connection context.

Here is example Local Development Connection Context:

  • Url

  • Private Key:

    • Client 1 Unity Build: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

    • Client 2 Unity Build: 59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d

  • World Address - 0x8d8b6b8414e1e3dcfd4168561b9be6bd3bf6ec4b

  • Sequencer Url (This is required for the target L2 chain)

  • Chain ID - 31337 (This is required for the target L2 chain)

Building the Lightweight Unity Client

After cloning and configuring the lightweight client to run locally, you will need to build the Unity game with two different client builds. Each client is configured with different private keys (see above) with the end result of launching the two games side by side on your Mac or Windows computer.

The build settings are pretty straightforward. As we have already configured the Local Development connection profile above, we simply need to select the following:

  • For Client 1, ensure the Development Connection Profile is configured with Anvil private address 1 specified. Ensure build_and_run_contract.sh and build_and_run_contract.sh are running in separate terminal windows.

  • Select File menu > Build Settings

  • Ensure the SampleScene is selected

  • Select your Windows, Mac, Linux operating system

  • Ensure “Development Build” is selected

  • Select Build

  • Specify the target application file name. Name it “Client 1”.

  • For Client 2, ensure the Development Connection Profile is configured with Anvil private address 2 specified.

Joining the Match with the Unity Lightweight Client

After building the two clients, run them side by side and select the following:

  • Select Find Match

  • Once find match is selected, the client will keep searching until another client accepts the match

  • When both clients have accepted the match, you will transition to the game screen, where you must place your pieces on the board and commit them.

Once you have placed your pieces - enjoy your game!

Git pull repo:

https://github.com/sovrun/chain-tactics-unity-client