How to add a schema source directory
By default, the GDK finds and compiles schema found within
.schema/ folders of packages referenced in your project’s
To compile schema from directories outside of referenced packages, you must add your schema source directories to the GDK tools configuration.
1. Create a folder for schema
First, create the folder in which you will be writing schema files. We recommend adding a
schema/ folder at the root of your SpatialOS project.
<project_root> ├── schema/ ├── snapshots/ ├── workers/
2. Open GDK tools configuration in Unity Editor
In the Unity Editor, select SpatialOS > GDK tools configuration to open the GDK tools configuration window.
3. Add a schema source directory
If you are setting up the blank project for the first time, you will find that there are no directories listed under the Schema sources section.
To add an entry, select the ➕ icon and enter the path to the schema directory you created earlier. Note that the path must be relative to your Unity project directory.
The GDK tools configuration window will display an error if the source directory does not exist.
After adding this entry and ensuring that no errors are displayed, select Save and close the window.