Support for C# development in Spatial will be rolling out starting in December 2023 as a private Beta, with wider availability starting in January 2024. 📌 Sign Up To Apply to Join the Beta
In order to maintain compatibility with all of our platforms, and to create a secure experience only specific allow-listed APIs can be used in Spatial. If you try to use an unsupported API you will be notified in the issues tab and be blocked from uploading.
Where can I use C# scripts?
C# scripts are currently available for Spaces made using the Spatial Creator Toolkit. Other types of content do not support scripting.
What APIs Can I Use from C#?
Currently we support a significant portion of APIs in the following modules
Unity.TextMeshPro+ Spatial-specific APIs
What APIs CAN’T I Use?
We can’t list all 5000+ currently blocked API calls here… but here are some common ones we have blocked: Any
staticvariables Use of the
unsafeKeyword Any Editor scripts Any
DontDestroyOnLoad— interferes with object lifecycles
maxDeltaTime— no modification of time settings
Camera.current— use the Spatial SDK APIs instead Networking APIs (
The following are not available currently and we are working on a resolution: Generic APIs such as
Job<>Using custom structs as properties in a MonoBehaviour
I Need to Use ___ API But It’s Not Supported
If you need functionality of a certain API that is not supported definitely let us know! We might be able to expand our supported APIs or write similar functionality in a Spatial-unique API. The best place to give this kind of feedback directly to the team is the Creator Toolkit section of the Spatial Discord