Getting Started
Package Types
Scene Setup
Economy
Scripting
Components
Guidelines
Support
C# Getting Started: Assembly Setup
Creating an Assembly Definition
In general, it’s a good practice to organize your project’s assets into folders. Having a dedicated folder for your scripts is required if you want to use C# with your toolkit creations. Create a new folder in your project with Create/folder
, name it something identifiable, like Scripts
.
Inside that folder, create an Assembly Definition with Create/Assembly Definition
.
In the Assembly definition’s inspector, make sure the name is CreatorToolkitCustomScripts
, and consider creating a Root Namespace
to keep your code organized.
Reference Assemblies
In order to reference code outside of your assembly like SpatialBridge
you need to link assemblies in your asmdef
file.
Click the +
under the Assembly Definition References
And select the SpatialSys.UnitySDK
assembly.
Ready to Test & Publish
Next, open the Spatial Creator Toolkit Settings, and drag the assembly to the C# Assembly field. Now all code inside the assembly will be included when you test or publish this package.
Next →