Unity + Truffle + zeknd Template

Overview

A template for a zeknd DAppChain with a Unity client. Contains:

  • Template Blueprint Solidity contract implementing a basic string-to-string map. Perfect as a starting point.

  • Pre-configured Truffle project that automatically extracts ABIs and binaries of compiled contracts into corresponding folders.

  • Pre-configured optimally setup Unity project with Blueprint contract test scene, and an already included zeknd SDK.

#Template Structure

├── DAppChain/
│   ├── build/ # zeknd binary and app/blockchain state data will be stored here
│   │   ├── contracts/ # Compiled contracts .bin will go here
│   │   └── ...
│   ├── start-chain.sh # Starts the zeknd DAppChain
│   ├── reset-and-start-chain.sh ## Resets app/blockchain state and starts the zeknd DAppChain
│   ├── genesis.json # Change this file when changing/adding contracts
│   └── ...
├── TruffleProject/
│   └── ...
└── UnityClient/ # Unity client project
    ├── Assets/
    │   ├── Contracts/ # Contract ABIs will go here
    │   └── ...
    └── ...

#Getting the Template

First, you need to install Truffle, if it isn't installed already:

After that, you can download the template itself:

Feel free to rename the zeknd-unity-project-template folder right away according to the name of your project.

#Building the Truffle Project

#Running the DAppChain

#Running the Unity client

Open the Unity project located in UnityClient. Open the Blueprint/BlueprintTest scene and run/build it.

#Workflow

  1. Make changes to the contracts.

  2. Build the Truffle project using truffle build.

  3. Start the zeknd DAppChain using DAppChain/start-chain.sh.

  4. Make changes to the Unity client project.

Last updated