Skip to content

Wildfire Environment Setup

This guide will walk you through setting up the development environment for fully customizing the Wildfire environment in Crew Dojo. If you have already set up Dojo, skip here instead.

Setting Up Unity

1) Unity Installation

  1. Create a free Unity account at Unity website
  2. Download and install Unity Hub from the downloads page
  3. Install Unity Editor version 2021.3.24f1:

  4. Open Unity Hub

  5. Go to "Installs" in the left panel
  6. Click "Install Editor"
  7. If 2021.3.24f1 is not visible in official releases, use the "Archive" option
  8. Note: Any version starting with 2021.3.X should be compatible

2) Required Build Modules

During Unity installation, ensure you select these build modules:

  • Windows (mono)
  • Linux (mono)
  • Mac (Mono)
  • WebGL builds

3) Opening the Project

  1. In Unity Hub, click "Projects" in the side panel
  2. Select "Add project from disk"
  3. Navigate to and select the /crew-dojo/Unity folder
  4. The project will open and automatically install necessary packages
  5. You can safely ignore any .meta file exceptions in the console

addproject

Nakama Setup

Skip this section if you have already set up CREW Wildfire here

1) Installing Docker

  1. Download and install Docker
  2. Ensure Docker service is running on your system

2) Setting up Nakama Server

  1. Make sure you have Go version 1.18 installed
  2. Navigate to the "Nakama" folder in your Dojo repository
  3. Run the appropriate script for your OS:
  4. Windows: run.bat
  5. Linux/Mac: run.sh
  6. Verify that the dojo-nakama-server container starts running

It should look like this: docker

Note: If you encounter issues:

  • If the Nakama container fails, try removing go.mod and go.sum and run the script again
  • If you get a "vendor folder not exist" error, run:
    go env -w GOPROXY="https://goproxy.io"
    

3) Accessing Nakama Console

The Nakama console is available at http://127.0.0.1:7351/

  • Default username: admin
  • Default password: password

Linux-Specific Configuration

If you're on Linux, you'll need to configure the Docker host:

  1. Open /etc/hosts file
  2. Add the following line:
    172.17.0.1    host.docker.internal
    

Once everything is set up:

  1. In the Unity Editor's Project window
  2. Navigate to Assets/Examples/Wildfire

The Wildfire project files are organized into several folders:

  • Configs/: Contains the configurations for the Nakama Server and Dojo Builder
  • Controls/: Contains player and communication controls
  • Materials/: Contains materials and textures for game objects and render images
  • Models/: Contains 3D models for game assets
  • Prefabs/: Contains reusable assets
  • Scenes/: Contains the Wildfire Unity scene and scene configurations
  • Scripts/: Contains all scripts

Now if you navigate to Scenes/Wildfire.unity you will see the Wildfire Unity Scene:

Unity Scene

After completing this setup, you'll have a development environment ready for customizing the Wildfire simulation. Check out Dojo Documentation for more information on the Dojo infrastructure. Then check out Environment Components for Wildfire specific components and customization.

Building Your Game

After making customizations, you can build your game using the Dojo Builder:

1) In the Unity Editor menu, locate "DojoBuilder"

2) Click "Build All"

dojobuilder

3) Select DojoBuildWildfire if it is not already selected and enable it

dojowildfire

4) Click "Build"

build

After building your game, you can now run algorithms on your environment as before.