Space Package

Space packages allow you to create full experiences using the Unity editor. Each space package represents a single space that users can join in the Spatial app. Multiple spaces can be organized under a World, which share a common economy and assets.

Package Setup

Inside Unity you can create a new space package by navigating to the project config window.

Image showing the gear icon highlighted in the Unity toolbar

In the configuration menu, select Space from the create new dropdown and click the Create button.

Image showing the create package button highlighted in the Spatial portal

Create a Scene

Each space package requires you define a singular Unity Scene. To create a new scene click the Create New Scene button inside the active package.

Image showing the create new scene button highlighted in the space package config

Creating a scene this way automatically populates your scene with all the required Spatial components meaning you are already ready to test.

Image of the template scene inside Unity

Test Your Scene

To test your package click the Test Scene button in the Unity toolbar. You may need to link your Spatial account in the portal if you haven't already.

Image showing the test scene button highlighted in the Unity toolbar

Once your space is built it will be uploaded to Spatial and you will automatically join the Spatial Sandbox in your browser where you can preview you space.

Image showing the template scene loaded inside Spatial

Using an existing Unity Project

When using assets from an existing Unity project it is recommended to export them as a unityPackage, then re-import them inside of your Spatial project.

A scene and all its dependencies can be exported by right clicking and selecting Export Package.

Image showing the export package option hovered

Space vs Space Template

The creator toolkit lets you create two types of “Space” assets. For the vast majority of cases we recommend you always create Space packages.

Space

When a space package is published for the first time, a space for that asset is automatically created on your spatial account. Additionally an SKU is created which links your Unity package asset to the space as it exists on Spatial. Spaces created this way can not have the environment changed without re-publishing the package.

Space Template

Templates are meant to be reusable environments that you can create multiple spaces with. To create a space using a space template that you previously published, go to spatial.io/create, then select your template from the “Creator Toolkit” section of the menu.

Space templates are more limited that regular Space packages. You cannot use C# scripts or any Spatial feature that relies on a World like the backpack.