These are the docs for 11.0, an old version of SpatialOS. The docs for this version are frozen: we do not correct, update or republish them. 14.1 is the newest →

Manual setup guide for macOS 10.11+

Note: For a simpler setup experience, try the SpatialOS setup guide that uses homebrew.

1. System requirements

Before following the setup guide check that your machine meets the hardware requirements.

2. Set up the SpatialOS CLI

To set up the SpatialOS CLI (spatial):

  1. Download spatial for macOS (64bit): Download.

    By downloading spatial, you agree to the SpatialOS EULA.

  2. Put spatial in a directory.

    For example, bin in your home directory: mkdir -p $HOME/bin && mv $HOME/Downloads/spatial $HOME/bin.

  3. Add the directory to your PATH. To do so:

    1. Open a terminal window.
    2. Move into home directory: run cd.
    3. Determine which configuration file to use (you will need to know your configuration file again in later steps): run ls -a ~

      • If you have a .bash_profile, that’s your configuration file.
      • Otherwise, if you have a .bash_login, that’s your configuration file.
      • Otherwise, if you have a .profile, that’s your configuration file.
      • If you don’t have any of these files, you can use .bash_profile (which you’ll create in the next step).
    4. Add the location of spatial to the PATH variable: run echo 'export PATH=$PATH:/path_to_spatial_here' >> ~/your_config_file_here

      For example: echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile

  4. Make sure spatial is executable: run chmod +x /path_to_spatial_here.

  5. Restart your terminal window to register the changes made to the path.

You know it’s done when:

Run in a terminal: spatial update

The printed URL link should open in your browser for authentication with your SpatialOS account. If the link does not open automatically in your browser click it or copy-paste it to visit the page.

Expected output:

Current version of the 'spatial' command-line tool: <version number>

Attempting to download the latest version...

Did not update 'spatial'. Latest version is already installed.

3. Set up external development tools

You need some external software in order to develop a SpatialOS application. All of it is listed below, and all of it is free!

3.1 Unity

Important: Unity versions 5.5.3 and 5.6.0 have been tested with SpatialOS. Later versions will probably work fine, but have not been extensively tested.

You MUST include Linux Build Support and Windows Build Support when you install Unity.

Install Unity version 5.6.0:

  1. Go to the Unity Download Archive.
  2. Next to version 5.6.0, from the “Downloads (Mac)” dropdown, select “Unity Installer”.
  3. Run the installer. In addition to the defaults, select Linux Build Support and Windows Build Support:

    Unity screenshot

  4. Install Unity into the default installation directory.

    Alternatively, you can set the environment variable UNITY_HOME to your customized Unity installation folder. For example, if you installed Unity to /Applications/Unity5.6.0, then set UNITY_HOME to /Applications/Unity5.6.0. This path cannot have spaces in it.

  5. Launch Unity and complete the registration process.

Important: Once you’ve set up a project, you’ll need to set the path to spatial from the Unity SpatialOS editor window. See the Unity SpatialOS editor window page for instructions.

3.2 Java Development Kit (JDK)

  1. Download and install the 64-bit JDK 8 for OS X. You’ll need to install the 1.8.0_65 version or newer.

    You know it’s done when:

    Run in a terminal: javac -version

    Expected output: javac 1.8.0_x

  2. Set the JAVA_HOME system environment variable by running:

    echo "export JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/your_config_file_here
    source ~/your_config_file_here

    You know it’s done when:

    Run in a terminal: echo $JAVA_HOME

    Expected output: /Library/Java/JavaVirtualMachines/jdk1.8.0_x.jdk/Contents/Home

    4. (optional) Install the Launcher

    The Launcher is a tool that lets you run a game client to connect to a SpatialOS game running in the cloud.

    1. Download the Launcher.
    2. Follow the instructions in the installation wizard.

    5. Next steps

    You’ve now set up your development environment with SpatialOS!

    To find out more about what SpatialOS is, try our product tour.

    To get started coding on the platform, start with the Pirates tutorial.

    (We really recommend starting from a tutorial, but if you want to start from scratch, use the Blank Project as your project outline.)

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums