Getting Started

Introduction

Installation

Project Configuration

Testing in Your Sandbox

Samples & Examples

Core Concepts & Glossary

Package Types

Spaces & Space Templates

Custom Avatars

Custom Avatar Animations

Avatar Attachments

Custom Prefab Objects

Embedded Packages

Drivable Vehicles

Scene Setup

Testing In Unity vs Sandbox

Controlling the Camera

Custom Collision, Layers, and Tags

Audio Mixers and Groups

Key Differences from Standard Unity3D development

Economy

Quests and Rewards

Economy Overview

Monetization

Items

Consumable Items

Rewarding Items

World Currency

Selling Items

Scripting

Components

Entrance Point

Camera Passthrough

Interactable

Trigger Event

Point Of Interest

Environment Settings Overrides

Render Pipeline Settings Overrides

Movement Materials

Climbable

Avatar Teleporter

Empty Frame

Projector Surface

Seat Hotspot

Guidelines

Supported Features and Limitations

Performance Guidelines

Lighting

Publishing to Spatial

Finding Published Packages

Support

FAQs

Help and Support

Release Notes

Asset Import Settings

Key Differences: Spatial and Standard Unity3D development

Using Third-Party Packages

Unity Packages with C# code require some changes to work with the Spatial Creator Toolkit, and there are some important limitations.

You can find a list of third-party packages with porting instructions here, including packages such as tweening and car control packages.

Camera

Spatial does not provide access to Camera.Main; instead i provides its own camera API. For more details on this, and on using Cinemachine, see the Camera documentation.

PlayerPrefs, Save Data, and the Data Store

Spatial does not support PlayerPrefs. Instead we have a cloud-save system we call the DataStore.

Saving to the DataStore creates a server request so we rate limit writes. This means inside your game-loop you should be reading/writing your save data to an intermediary C# object which you periodically write to the DataStore.

For more information view the DataStore API Reference.

Resources

A common technique for referencing assets in Unity is to drop them all inside a /Resources folder then load them at runtime with Resources.Load(.... Unfortunately, Unity3D does not allow Asset Bundles to add contents to Resources, so Spatial does not allow Creator Toolkit projects to use Resources.

Strategies for Referencing Assets

Instead, you can re-create the Resources.Load workflow with ScriptableObjects. Create an object that holds a collection of UnityEngine.Objects and then add the assets you want to reference to it.

[CreateAssetMenu(fileName = "NewAssetCollection", menuName = "AssetCollection")]
public class AssetCollection : ScriptableObject
{
    public UnityEngine.Object[] assets;
}

You can then search through the AssetCollection.assets by object name similar to Resources.Load.

<aside> <img src="/icons/light-bulb_red.svg" alt="/icons/light-bulb_red.svg" width="40px" /> Remember that packages uploaded only contains the dependencies of a scene. If your AssetCollection is not directly referenced by a GameObject in the scene it will not be included.

</aside>

Scene Management

A key limitation of Spatial Creator Toolkit projects is they can only have one scene. This means that if you’re used to creating several scenes for different levels, or even reloading the same scene to reset the game, you’ll have to design around this limitation.