Skip to content
mlatu edited this page Aug 14, 2023 · 41 revisions

These steps will guide you through the procedure of creating a new Unity project with Arcadia enabled. If you've never downloaded Arcadia before, this guide is for you.

Getting started with Arcadia involves three steps:

  1. Start a Unity project
  2. Configure Unity to work with Arcadia
  3. Add Arcadia to the project

Start Unity Project

Create a new Unity project as you normally would.

Mono Runtime Configuration

There are three settings under Edit → Project Settings → Player that need to be set so that Arcadia runs in the proper Mono environment:

  • Scripting Runtime: .NET 4.x Equivalent
    • This option is only needed in Unity older than 2019.2.1f1
  • Scripting Backend: Mono
  • Api Compatibility Level: .NET 4.x
    • This option becomes just ".NET Framework" in later versions

This varies a bit between versions of Unity, but generally these settings are found in the Player inspector under Other Settings → Configuration. The final inspector should look something like this:

You may be asked to restart Unity. This is normal, let Unity do its thing.

Add Arcadia

There are two ways to bring Arcadia into your project: download a release or clone the repository. Downloading a release is best if you want the latest, most stable version of the framework. Cloning the repository is best if you want access to unreleased or experimental features.

Download a Release

Our releases are available on our GitHub releases page. Download the Source Code archive for the version you want (or the latest version if you are not sure) and extract its contents into a folder called Arcadia within your Unity project's Assets folder.

Clone the Repository

Git clients work differently, but the basic task is to clone the Arcadia repository at https://github.com/arcadia-unity/Arcadia.git into a folder called Arcadia in the Assets folder of your Unity project.

On OSX/Linux machine, the shell commands are

$ cd /path/to/unity/project/Assets
$ git clone https://github.com/arcadia-unity/Arcadia.git

On Windows or using a GUI git client you will have to perform the equivalent operations.

Confirming Installation

Switch back into Unity. It is normal for it to take a moment to load all the new code.

To confirm Arcadia's installation, check your Unity console. If it is not open, select from the main menu Window → Console. There may be errors and warnings, but if it ends with Arcadia Started! you should be set.

If you instead get some error along the lines of:

Assets/Arcadia/Helpers/PlayerCallbacks.cs(29,5): error CS0234: The type or namespace name 'Util' does not exist in the namespace 'Arcadia' (are you missing an assembly reference?)

Go back to Mono Runtime Configuration and double check that your settings match.

First Compile

From the main menu select Arcadia → AOT Compile to compile all of Arcadia's source code into your project. This will ensure optimal load times.

Next Steps

Once Arcadia is up and running in your Unity project what's left is to start live coding by connecting to the Arcadia REPL and develop your game in Clojure.

Clone this wiki locally