Getting Started
Package Types
Scene Setup
Economy
Scripting
Components
Guidelines
Support
Excluding Editor code from your C# assembly
In your Spatial Creator Toolkit C# Assembly, you may have code in one more multiple Editor
subdirectories.
This is supported, but to prevent compile issues and analyzer warnings, exclude this code from your assembly in one of two ways:
Option 1: (preferred) Create an assembly definition inside each Editor folder. Make sure that the only selected platform is Editor.
Option 2: Surround all Editor code in a #if UNITY_EDITOR
… #endif
directive. You will need to do this for every file that has Editor code.
Are you seeing compile errors about UnityEditor symbols not found?
Check the list of platforms in the Assembly Definition you created for Editor code. Make sure the only platform is Editor (see screenshot above).
← Previous
Next →