The Unity SpatialOS window is experimental.
The Unity SpatialOS window is an easy way to run spatial
command-line tool (SpatialOS documentation) commands
from inside Unity. It also lets you manage aspects of SpatialOS projects.
To open the SpatialOS window:
-
In the Unity Editor, use the menu
Window > SpatialOS
. -
At the top of the window are your project's name and SpatialOS SDK version.
- Click Build to open the Build tab.
- Click Settings to open the Settings tab.
- Click Support for quick links to the forums and documentation.
From the Build tab, you can run the following build tasks:
-
Generate code from your schema (SpatialOS documentation) (and clean generated code)
-
Build entity prefabs (and clean them)
-
Build worker code (and clean it)
To choose which target you're building for, use the drop-down menu and checkboxes at the top of the build tab:
For local deployments, select
Development
. For cloud deployments, selectDeployment
. Similarly, select the checkbox for whichever worker code you've made changes to.
From the Build tab, you can:
-
Run a local deployment (SpatialOS documentation). Click
default_launch.json
to change which launch configuration (SpatialOS documentation) the deployment uses. -
Upload (SpatialOS documentation) an assembly of this project (the full set of binaries for all your workers and their assets). Enter a name to use as a label for the assembly.
-
Connect a client to a running cloud deployment.
For instructions on how to run a cloud deployment, see the Deploying to the cloud (SpatialOS documentation) page.
From the Settings tab, you can:
-
Under
Spatial CLI location
, set the location of thespatial
CLI tool.On Windows: If the
spatial
CLI cannot be found, enter the path tospatial.exe
here.On macOS: You'll need to set the path to
spatial
from the SpatialOS window in the Unity Editor:-
In the window, click
Settings
. -
In the
Spatial location
field, enter the path to wherespatial
is installed on your machine.If you used
brew cask install spatial
to install spatial, the path should be/usr/local/bin/spatial
.
-
-
Update
spatial
to the latest version by clickingUpdate
. We recommend doing this frequently.