C# Godot Editor vs Runtime Boundary
This repo intentionally splits Godot runtime integration from Godot editor tooling.
Why
Godot editor APIs (e.g. EditorPlugin) are editor-only and should not be pulled into:
- Runtime builds
- Headless CI builds
- .NET test projects (GoDotTest / MSTest / xUnit)
Mixing editor-only types into runtime assemblies causes build failures (and frequently test-host crashes) because the editor API surface is not available in those contexts.
Projects
Godot/GridBuilding.Godot.csproj (Runtime)
- Assembly:
GridPlacement.Godot - Scope: Runtime node adapters + wrappers + services.
- Allowed dependencies:
Core/GridBuilding.Core.csproj- Godot runtime (
Godotnamespace) that is safe in player/headless contexts.
- Must NOT include:
EditorPluginor other editor-only types.
- Enforced by:
Godot/GridBuilding.Godot.csprojexcludingGodot/Editor/**from compilation.
Godot/GridBuilding.Godot.Editor.csproj (Editor-only)
- Assembly:
GridPlacement.Godot.Editor - Scope: Godot editor plugin entrypoints and editor tooling.
- Contains:
Godot/Editor/GridBuildingPlugin.cs(extendsEditorPlugin).
- References:
Godot/GridBuilding.Godot.csproj(runtime)Core/GridBuilding.Core.csproj(core)
- Testing:
- Not referenced by test projects.
Tests/Godot/GridBuilding.Godot.Tests.csproj
- Should reference runtime + core only:
Core/GridBuilding.Core.csprojGodot/GridBuilding.Godot.csproj
- Must NOT reference the editor-only project.
Folder boundary
Godot/Editor/**is editor-only.- Everything else under
Godot/**is expected to be safe for runtime and test builds.
Rule of thumb
If a type is only valid inside the Godot editor (tooling, editor UI, editor menus):
- Put it in
Godot/Editor/** - Compile it only in
GridBuilding.Godot.Editor.csproj
If a type is used at runtime (nodes, adapters, services):
- Keep it in
Godot/**(outsideEditor/) - Compile it in
GridBuilding.Godot.csproj