MultiConnectMultiConnectDocs Website home
MultiConnectSDK › CLI

11. Using the CLI with Unity

Build and Deploy Server in Unity and the CLI share multiconnect.json, so a project linked by either one works in both.

The easiest way to combine them is to build in Unity, then deploy the same build from a terminal:

  1. In Unity, open MultiConnect > Build and Deploy Server, and press Build and Deploy at least once. The window sets the build paths, and keeps its builds in Builds/MultiConnect in the project folder, which Unity's standard .gitignore already leaves out.
  2. Give the CLI your key. The window keeps its copy of the key inside Unity, so the CLI needs its own: set MC_ACCESS_KEY and MC_ACCESS_SECRET in your terminal, or run multiconnect init once and enter the same deployment and build paths.
  3. From your project folder, run:
multiconnect deploy --skip-build

To deploy a Unity build you made yourself, run multiconnect init, and give your build folder as the build path. The folder must contain the binary named in the deployment's Entry Point File, built for Linux as a Dedicated Server.

To build in CI, set your own Unity command as the build command, using Unity's batch mode. Your CI machine needs Unity with Linux Dedicated Server Build Support installed and licensed.