Godot (C#) and NetPrints: what is known
Date: 2026-10-14. Godot 4.7.2-stable .NET (Godot.NET.Sdk 4.7.2) was the target; 4.3-stable was checked only for differences, and
where they differ it is said. Repo citations are for 005-editor-shell at e05277a1 and may have moved. This note distils
an earlier research and its experiments; nothing new was researched for it.
Tags: [V] verified (a URL, a repo file:line, or an experiment that was run), [I] inferred. E<n> is an experiment in
that research (E1 to E20), kept so the claim can be re-run.
Source URLs used below (abbreviated, same host and path as fetched):
GEN=https://raw.githubusercontent.com/godotengine/godot/4.7.2-stable/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/(4.3 is the same path with4.3-stable).SDK=https://raw.githubusercontent.com/godotengine/godot/4.7.2-stable/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/.DOCS=https://docs.godotengine.org/en/stable/(and/en/4.3/).
1. What is known
1.1 What makes a class a Godot script
Unless marked, 4.7.2 behaves the same as 4.3.
| Requirement | Evidence |
|---|---|
The class derives from GodotObject (assembly GodotSharp) through its base chain | GENExtensionMethods.cs, TryGetGodotScriptClass [V] |
partial on the declaration | GENScriptPathAttributeGenerator.cs L48-53 keeps only cds.IsPartial(); the properties, signals, methods and serialization generators use the same filter [V] |
| A top-level class. Nested classes never get a ScriptPath; a nested Godot class needs every outer type partial (GD0002) | same generator L45 [V] |
| File name without extension equals the class name, case-sensitive | same generator L55-57 [V]; DOCStutorials/scripting/c_sharp/c_sharp_basics.html ("should refer to a class that has a class name that matches the file name") and .../c_sharp_global_classes.html ("must match the class name in case-sensitive fashion") [V] |
| One class of that name per file; other classes in the file are allowed but are not scripts | GD0003, GENCommon.cs [V] |
| Any namespace | E3 [V] |
The file sits under the Godot project folder (res://) | the path is computed relative to GodotProjectDir, GENScriptPathAttributeGenerator.cs L189-202 [V]; a file outside gives res://../..., which Godot cannot load [I] |
Consequences for generated graph code:
- A missing
partialis silent. GD0001 is an analyzer that does not look at generated code (GeneratedCodeAnalysisFlags.None,GENClassPartialModifierAnalyzer.cs L23, same in 4.3 and 4.7.2) [V]. NetPrints files carry// <auto-generated>and end in.g.cs, so a non-partial graph class builds with 0 warnings and is just not a script (E1) [V]. Foo.netpc.g.cscan never match: the file name without extension isFoo.netpc.g. Even withpartial, the class gets its members generated but no[ScriptPath]and is not inAssemblyHasScripts(E2) [V]. Any*.g.csname fails the same way.- A hand-written partial plus the generated partial works (E3, E4) [V]. A hand file
Scripts/Foo.csholdingnamespace Probe; public partial class Foo;and a graph fileGraphs/Probe.Foo.netpc.g.csholdingpublic partial class Foo : Node3Dgives[ScriptPathAttribute("res://Scripts/Foo.cs")]on the hand file, and the class runs as a scene root script on 4.3 and 4.7.2. If the graph part lackspartial, the build fails with CS0260 on the graph file (E6) [V]. The editor compiles hand sources and translated graphs together (src/NetPrints.Editor/Hosting/ReflectionHost.cs:105-117,src/NetPrints.Core/Compilation/CodeAnalysisSession.cs:90-97), so it should show the same error [V code, I for the exact message]. - Godot 4.4 and later writes
<file>.cs.uidnext to every.csunderres://, generated graph files included (E8) [V]. An empty.gdignorein the graphs folder prevents that, and the anchor-registered class still works (E20) [V]. - Attributes on generated code are honoured, because the generators read symbol-level members (4.7.2
GENScriptPropertiesGenerator.cs L116,GENScriptSignalsGenerator.cs L116). ASpeedexport and aHitsignal declared in the graph file were generated, and the scene'sSpeed = 42was applied (E3, E4).[GlobalClass]in the graph file registered classFoowith pathres://Scripts/Foo.csinglobal_script_class_cache.cfg(E5) [V].
1.2 What NetPrints can and cannot do today
partialis modelled end to end:ClassModifiers.Partial = 64(src/NetPrints.Core/Core/ClassGraph.cs:36-39), emitted byClassTranslator.cs:183-186, JSON"modifiers": "Partial"(ClassDocument.cs:38), an inspector checkbox (ClassInspectorView.axaml:27-28,ClassInspectorViewModel.cs:127). New classes start withNone(src/NetPrints.Core/Profiles/DefaultProjectProfile.cs:67-73) [V].- Attributes in graph data: none at the time of that research.
schemas/netpc.v1.schema.jsonhad noattributesand no delegate declarations, so a[Signal] delegatecannot be declared in a graph. Attributes came only from the experimental emitters (ClassTranslator.cs:110-113,ClassEmitContext.AttributesL39,MemberEmitContext.AttributesL51) [V]. ADR-0039 now decides native attributes (see the README), which supersedes this for the future. - Graphs cannot see members produced by source generators: the project system takes
roslynProject.Documents(MsBuildProjectSystem.cs:411-425) and the reflection provider compiles those plus the translated graphs with no generator driver (ReflectionHost.cs:105-123) [V code]. Roslyn'sProject.Documentsexcludes generated documents [I]. So Godot'sSignalName.X,PropertyName.Xand the C# event produced from a signal delegate do not appear in node search [I].
1.3 Running and launch profiles
- IDEs launch Godot C# with an
Executableprofile (Visual Studio: path is the Godot .NET binary or%GODOT4%, working directory., optional native debugging), acoreclrlaunch with"program": "${env:GODOT4}"and adotnet buildpre-task (VS Code), or built-in support (Rider).DOCStutorials/scripting/c_sharp/c_sharp_basics.html [V]. Debugging stays an IDE feature; NetPrints has no debugger. dotnet runon SDK 10.0.400 already runs a firstExecutableprofile on the (Library-type) Godot project: it builds, expands%GODOT_BIN%, uses the project folder as the working directory whenworkingDirectoryis absent, and the game reads the-- args(E13) [V].- Godot runs the assembly
dotnet buildwrote to.godot/mono/temp/bin/Debug(E4, E13), so the game needs no Godot build step. Godot.NET.Sdk declaresConfigurations = Debug;ExportDebug;ExportRelease(SDKSdk.props L13, same in 4.3) [V]. An editor binary loads the Debug output, so running after a NetPrints Release build would start a stale assembly [I]. - The editor's Run is gated on
OutputType=Exe(src/NetPrints.Core/Core/Project.cs:176-179,src/NetPrints.Editor/Commands/RunCommandHandler.cs:10), so it is disabled for Godot whatever the profile says.netprints runhas no such gate (src/NetPrints.Cli/Commands/RunCommand.cs:30-48) [V code; I for the CLI outcome]. ADR-0037 changes the gate. - Stop kills the process tree (
src/NetPrints.Editor/Hosting/Avalonia/ProcessLauncher.cs:61, 87-91). Fine for the game; for a Godot editor profile it loses unsaved work [V code]. ADR-0037 decision 9 adds a graceful Stop. - Child processes inherit the variables MSBuildLocator sets in NetPrints' own process (
MSBUILD_EXE_PATH,MSBuildSDKsPath,MSBuildExtensionsPath;src/NetPrints.Workspace/MsBuildRegistration.cs:67,74). An editor that builds C# itself (Godot-eon Play) could see them [I];ProcessStartRequestcannot unset a variable. - On macOS Godot is a
.appfolder, so the executable isGodot.app/Contents/MacOS/Godot(anexecutablePathof the bundle must be resolved) [VDOCStutorials/editor/command_line_tutorial.html, from the run-profile audit]. - A fresh copy (no
.godot/) must be imported once (--import) before scenes load assets. The C# still runs, but textures and models fail (E7, 4.3 and 4.7.2) [V]. --upwardsno longer exists in 4.7.2. It is absent from--helpand frommain/main.cpp(present at 4.3-stable L540, L1533) and does not find the project from the output folder (E17) [V]. An earlier run-profile report proposed it as the portable trick; that is superseded.- Working directory portability:
dotnet runresolves a relativeworkingDirectoryfromProperties/; Visual Studio resolves it from the project folder, and its default when absent is the output folder [V, run-profile report]. A profile that works under NetPrints anddotnet runtoday omitsworkingDirectoryand passes--path .(E13) [V]. - An earlier experiment hard-coded a Godot executable lookup in the build system. ADR-0037's
Executableprofile replaces that.
Godot flags useful for automation (4.7.2 --help, DOCStutorials/editor/command_line_tutorial.html, DOCStutorials/animation/creating_movies.html) [V]:
| Flag | Use | Experiment |
|---|---|---|
--headless | logic and smoke tests only (--display-driver headless --audio-driver Dummy) | E4, E16 |
--scene <path or uid> | run a specific scene | E14, E16 |
--path <dir> | the project folder | all |
--quit-after <N> | quit after N iterations | E14 |
--fixed-fps <fps> | fixed delta, deterministic stepping | E16 |
--write-movie <file> | Movie Maker frames; forces fixed fps | E14 |
--rendering-driver opengl3, --rendering-method gl_compatibility | llvmpipe on Xvfb | E14 |
--resolution WxH | did not change the movie size; set the viewport in project.godot | E14 |
-- <args> and OS.GetCmdlineUserArgs() | scenario, seed, autopilot | E4, E13, E16 |
GetTree().Quit(code) | the process exit code | E16 |
--import | editor build: import assets, then quit | E5, E7 |
--headless together with --write-movie segfaults on 4.7.2 (E15) [V]; frame capture needs Xvfb or a real display.
1.4 Restore, NPE001 and how a copy gets the SDK
NeedsRestorehardcodesobj/project.assets.json(src/NetPrints.Workspace/MsBuildProjectSystem.cs:293-311) and runs before the in-process evaluation (L80, then L86). Godot setsBaseIntermediateOutputPathto.godot/mono/temp/obj/when empty (SDKSdk.props L27-28), and evaluation givesProjectAssetsFile = <proj>/.godot/mono/temp/obj/project.assets.json(E11). So a Godot project restores on every load. Wasteful, not the failure [V]. Any project that movesBaseIntermediateOutputPathor usesUseArtifactsOutputhits the same.- An earlier audit's NPE001 "partial repro" (
-restore -getItemreturning 0 graphs) was an artefact of evaluation-only mode (E12) [V]. A copied Godot sample restores NetPrints.Sdk 0.2.0 into.godot/mono/temp/obj/*.nuget.g.propscorrectly. - NPE001 means "graph files exist, none loaded" (
src/NetPrints.Editor/Hosting/ProjectLoader.cs:290-294); a failed restore has its own message (L279-285). The real cause of the owner's NPE001 on a copied sample is unproven; candidates [I]: a stale bundle in Desktopbin, an offline or feed failure, or a copy built against the released generator. - In the repo,
samples/Directory.Build.propsand.targetsimportsrc/NetPrints.Sdk/build/*and the generator fromsrc/NetPrints.Generator/bin/$(Configuration)/net10.0(NetPrintsUseLocalSdk=true). A copy outside the repo uses the sample'sPackageReferencetoNetPrints.Sdk, whose versionSampleCatalogrewrites (src/NetPrints.Editor/StartPage/SampleCatalog.cs:14,71; ADR-0022). So a copy builds with the released generator, and a sample that uses unreleased features breaks as a copy [V code]. - Godot's extra configurations (
ExportDebug,ExportRelease) would break the in-repo generator path, becausesamples/Directory.Build.propssetsNetPrintsGeneratorConfiguration=$(Configuration)andbin/ExportRelease/...does not exist [I].
1.5 C# language level and target
- Godot 4.5 requires .NET 8 or later (Android export needs .NET 9); migration from 4.3 to 4.4 sets .NET 8 as the minimum
(
DOCStutorials/scripting/c_sharp/c_sharp_basics.html) [V]. Sdk.propssetsGodotProjectDirandGodotTargetPlatformdefaults and noTargetFrameworkorLangVersiondefault (SDKSdk.props, fetched 2026-10-14), so anet8.0project gets C# 12 unless it overridesLangVersion[V]. On 4.7.2,net10.0builds and runs (E10) [V].- Version-dependent output already appeared: the hand anchor
public partial class Foo;is C# 12; below that it must be{ }.
1.6 Samples, repo hygiene and quality gates
- Bundling copied the sample with
<Content>items excludingbin,objandCompiled_*(src/NetPrints.Desktop/NetPrints.Desktop.csproj:47-52); copying skipped the same (SampleCatalog.cs:83-104), so a.godot/(13 MB in the design sample) or.vs/would be copied [V code]. The .NET SDK already treats dot-folders as non-content (**/.*/**in default item excludes) [I]; a non-dot output folder is picked up (E9). - Godot's guidance (
DOCStutorials/best_practices/version_control_systems.html, 4.1 and later) [V]: ignore.godot/and*.translation;export_presets.cfgheld credentials only in 3.x and 4.0. The editor's "Generate Version Control Metadata" writes a.gitignorewith.godot/and/android/and a.gitattributeswith* text=auto eol=lf(https://raw.githubusercontent.com/godotengine/godot/4.3-stable/editor/editor_vcs_interface.cpp, L362-385) [V]. Thegithub/gitignoreGodot template also listsexport_credentials.cfg,.import/(3.x),mono_crash.*.json,data_*/[V]. - Keep in git:
project.godot,*.tscn,*.tres,*.importfiles,*.uidfiles (4.4 and later; bloghttps://godotengine.org/article/uid-changes-coming-to-godot-4-4/) andexport_presets.cfgwhen a preset exists [V]. - Root build settings do not reach samples by design:
samples/Directory.Build.propsdoes not import the root props andsamples/Directory.Packages.propsturns central package management off. The root.editorconfigapplies by path inside the repo (its[*.cs]sections set Sonar, IDISP and VSTHRD rules tosuggestion; the curatederrorset is under[src/**.cs],.editorconfigL127, L558-564) and is lost in a copy [V]. - Analyzers on Godot code (E18; Godot.NET.Sdk 4.3, Sonar 10.34, IDISP 4.0.8, VSTHRD 18.7,
TreatWarningsAsErrors) [V]:- noisy or breaking: CS8618 on
[Export] public Node3D Muzzle { get; set; }and on fields assigned in_Ready; IDISP004 onAddChild(new Timer { ... })(the tree owns the node); S2325 on helpers onceTreatWarningsAsErrorsis on; - S109 catches
WaitTime = 0.15,half > 3,x * 0.25f, but not[Export]initializers,new Color(0.2f, 0.8f, 1f)orfloat half = Thrust * 0.5f; - generated code (Godot's and NetPrints') got no Sonar hit;
BannedApiAnalyzers(RS0030) flagsnew Color(...)(doc id must be the 4-float overload) andGD.Print, in hand code and in.netpc.g.cs: banned-API checks also enforce rules on graph output (E19).
- noisy or breaking: CS8618 on
1.7 Testing a Godot sample headlessly
- GdUnit4Net is a VSTest adapter (
gdUnit4.test.adapter) configured withGODOT_BINand.runsettings, with[RequireGodotRuntime]and a scene runner with input simulation. Godot 4.6 to 4.7.2 are supported only on master (v5.1.0-rc6, adapter v3.2.0); the last stable release is v5.0.0 (2025-06-21). No Microsoft.Testing.Platform support (issue #442). CI on Xvfb is slow and the maintainer advises a headless import first (discussion #350). The repo'sglobal.jsonsets the MTP runner, so a VSTest project would need its ownglobal.json[V; sources: the GdUnit4Net README and discussions on GitHub,gdUnit4/gdUnit4Net]. - GoDotTest runs tests inside the game (
--run-tests, coverlet) and has nodotnet testadapter [V, Chickensoft docs]. - Plain Godot:
--headless --scene <scene> --fixed-fps 60 -- --case=thrustwith a script that callsGetTree().Quit(3); the process exits with 3 and the script sees the args (E16) [V]. - The repo's E2E job already installs Xvfb and uses
--fail-skips(.github/workflows/ci.yml:322-370) [V]. The official Linux .NET build isGodot_v4.7.2-stable_mono_linux_x86_64.zip, 107,698,034 bytes, a GitHub release asset [V]. - Godot.NET.Sdk comes from NuGet, so a sample compiles in CI with no Godot binary [I].
1.8 NetPrints-side issues found while building the Godot showcase
From the showcase's owner decisions and rules digest (2026-10-14). Status is as of that date and was not re-checked.
| Item | Status |
|---|---|
| Run from the editor did not start the game (owner: "cuando lanzo el proyecto desde netprits no se lanza el juego") | Cause is the OutputType=Exe gate; addressed by ADR-0037 (not yet built) |
| NPE001 on a copied sample | Cause unproven (section 1.4) |
Samples not listed in the editor's samples panel; the Desktop csproj hard-coded sample names and a Godot-specific .godot\** exclude | Owner rule: the core and workspace stay engine-agnostic, no engine names or paths in them; the exclusion rule should be generic (section 2.4) |
continue not generated inside if; if lacks an exec output for early return or short-circuit | Owner-reported defects on the design branch; not tracked here |
If.Completed meaning ("after the if") and the dead code it can create (CS0162) | Owner: the SDK should promote CS0162 to an error by default and map it back to the node; pending |
| Irreducible graphs: a warning goes unnoticed, an error is hard to explain | Owner proposal: catch it at connection time (red link, explanation, suggestion); pending research |
| Owner decided that blueprints are integrated into the game at the end, when NetPrints is more mature; the game is C# for now | Decision, not a defect |
2. How NetPrints would integrate
All of this keeps the core engine-agnostic: "Godot" appears only in data (a template, a profile, a sample) or in an extension.
2.1 Script discovery: a hand-owned anchor
- Keep the
X.netpc.g.csname. The suffix is the generated-file marker insrc/NetPrints.Sdk/build/NetPrints.Sdk.targetsL8-10 (GeneratedFile,Compile Remove="**/*.netpc.g.cs"), inMsBuildProjectSystem.cs:416and inCodeAnalysisSession; naming itFoo.cswould also need the class name inside MSBuild and would make Godot treat generated output as an editable script [I]. - A scene-attachable graph class is
partialand has a hand-owned<ClassName>.csin the project, same namespace, containingpublic partial class <ClassName>;(or{ }below C# 12). This is ordinary C# convention (one type per file, named after the type; Unity has the same rule [I]), so NetPrints learns nothing about Godot and nosrc/change is needed [I]. - Class-level Godot attributes (
[GlobalClass],[Tool],[Icon]) go in the anchor;[Export]and[Signal]go in hand-written C# bases (what the research recommended while graphs had no attributes). - Put graphs and their
.g.csin a folder with an empty.gdignore(for exampleBlueprints/), anchors inScripts/: no.netpc.g.cs.uidchurn and the FileSystem dock does not offer generated files as scripts (E20). - Default
Partialfor new classes: recommendation was not to change the core default (it changes what plain .NET users get); an out-of-tree project profile can default it (IProjectProfile.ClassTemplates,ClassTemplate.Create) without core code. - Optional engine-neutral command "Add C# partial file" (class context menu and inspector): sets
ClassModifiers.Partialthrough the undoableSetMemberPropertypath, writes<ClassName>.csnext to the graph (namespace <Ns>;thenpublic partial class <Name>;, or{ }whenLangVersionis below 12), never overwrites. It is the seam for any generator that requirespartial(Godot, UnrealSharp[UClass], CommunityToolkit.Mvvm,[GeneratedRegex],[LoggerMessage]). Proposed home:src/NetPrints.Editor/Commands/AddPartialFileCommandHandler.csregistered inFileContributions.cs. ADR-0039 decision 7 and ADR-0038 mention the same need [I]. - Pin today's behaviour with tests before relying on it:
Partialplus a base type givespublic partial class X : B;"modifiers": "Abstract, Partial"round-trips; aPartialgraph class pluspublic partial class X;compiles, and withoutPartialgives CS0260 mapped to the class.
2.2 Godot attributes from graphs
Through the plugin extension model of ADR-0039 (README): a Godot extension registers [Export], [Signal], [GlobalClass],
[Tool] and the rest as attribute descriptors, with inspector sections and type editors. The earlier research recommended exactly this
extension route over a neutral core attributes list, on top of ADR-0036's per-member extension bag; ADR-0039 amends ADR-0036 and now
puts native attributes in the core.
Godot features this note can state, from the sources above: [Export] fields and properties are generated and applied (E3, E4);
[Signal] delegates are generated (E3, E4, with the limitation that a graph cannot declare a delegate); [GlobalClass] registers the
class (E5). Anything else ([Tool], [ExportGroup], [ExportCategory], export hints and their argument shapes, [Icon], [Rpc])
is not covered by the sources and is an open question.
2.3 Running: Executable profiles
ADR-0037 gives the integration with no Godot code. The profiles the showcase uses (Properties/launchSettings.json, data in the
sample) [I, not run through NetPrints because the feature is not built; the equivalent command is E13]:
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"Game": { "commandName": "Executable", "executablePath": "%GODOT4%", "commandLineArgs": "--path ." },
"Godot editor": { "commandName": "Executable", "executablePath": "%GODOT4%", "commandLineArgs": "--editor --path ." }
}
}
-
GODOT4is the variable name Godot's docs use. NoworkingDirectory: see section 1.3. Visual Studio users set Working Directory.locally. -
Order matters: the default is the first profile NetPrints can run, so
Gamefirst keeps Run from opening an editor that Stop would kill. -
First run on a fresh copy needs an import. Either a sample-owned target (engine code in the sample, not in
src/) [I, not run as a target; the command is E5/E7]:<Target Name="GodotImportOnce" AfterTargets="Build"Condition="'$(GODOT4)' != '' and !Exists('$(MSBuildProjectDirectory)/.godot/imported')"><Exec Command=""$(GODOT4)" --headless --path "$(MSBuildProjectDirectory)" --import" /></Target>or a data-only third profile
"Import assets"(--headless --path . --import). -
Frame capture on Xvfb stays with the caller (a profile cannot portably wrap
xvfb-run); an optional"Capture"profile can hold the Movie Maker flags. Agent recipe [V, E14 shape]:dotnet build samples/GodotSpaceShooter -v q -tl:off --nologo"$GODOT4" --headless --path samples/GodotSpaceShooter --importxvfb-run -a -s "-screen 0 1920x1080x24" "$GODOT4" --path samples/GodotSpaceShooter \--rendering-method gl_compatibility --rendering-driver opengl3 \--fixed-fps 30 --disable-vsync --write-movie "$OUT/frame.png" --quit-after 300 \--scene res://Scenes/Demo/Flythrough.tscn -- --autopilot --seed=1 -
Details the earlier research proposed beyond ADR-0037 and that the ADR does not state: children must not inherit MSBuildLocator's variables (section 1.3); the profile picker,
-lpin the CLI and graceful Stop belong to the same batch. -
Debugging is out of scope; document the Visual Studio, VS Code and Rider route with the same
launchSettings.json.
2.4 Restore, copies and samples
- Read the evaluated
ProjectAssetsFile(fallback$(MSBuildProjectExtensionsPath)project.assets.json, thenobj/), restore if needed and re-evaluate only if a restore ran. Timestamp inputs stay the project file,Directory.*files andNuGet.configup the tree. Tests: a fixture whoseDirectory.Build.propssetsBaseIntermediateOutputPath=build/obj/restores once and a second load runs no restore; touching the csproj restores again [I, recommendation]. - NPE001 without
RestoreFailedshould say what the evaluation found (for exampleNetPrintsSdkVersionempty, thePackageReferencecondition false, or the package missing from the assets file).ProjectLoader.HasGraphFiles(L297-301) should skip dot-folders. - Keep ADR-0022. Add a CI step: pack the working-tree packages (
scripts/pack-local.sh), copy each bundled sample out of the tree with the catalog's own copy code, rewrite the version, add a temporaryNuGet.configforlocal-packages, build and assert every graph generated. Map unknown configurations insamples/Directory.Build.propsto the generator build that exists [I]. - One exclusion rule for bundling and copying: skip
bin,obj,Compiled_*and any directory starting with., at any depth; keep dot-files (.gitignore,.gitattributes,.gdignore,.editorconfig). The Desktop csproj gets one wildcard item. Do not parse.gitignore(negation, anchoring, nested files); test instead that the bundled files are a subset ofgit ls-files samples/<X>. - Optional
sample.jsonmanifest (title,summary,requires,exclude); this has been superseded in shape by the roadmap's "Samples from remote sources" (netprints-sample.json, README). - Sample-owned quality gates, not repo props:
Nullable=enable,WarningsAsErrors=nullable(notTreatWarningsAsErrors, which would fail on Sonar defaults outside the repo),SonarAnalyzer.CSharpandBannedApiAnalyzerswith explicit versions andPrivateAssets="all"; a non-root.editorconfig(S109, S1192, S1854, S1481, RS0030 aterror;IDISP*and S2325 off, because the tree owns nodes and editor-connected signal handlers are instance methods);BannedSymbols.txt(GodotColorconstructors,GD.Print*, raw key-code input such asInput.IsKeyPressed,System.Console). Nullable without!:[Export]references are nullable and validated once in_Ready. - Sample
.gitignore:.godot/,*.translation,/android/,export_credentials.cfg,mono_crash.*.json;.gitattributes:* text=auto eol=lf.
2.5 Testing
Lightest option that runs real scenes: process-level smoke tests. Smoke scenes in the sample (Tests/Smoke/*.tscn) with one small node
that reads OS.GetCmdlineUserArgs(), steps N physics frames at a fixed fps, checks state and signals, prints one result line and calls
GetTree().Quit(0 or 1). A runner project outside the sample (xUnit v3 on MTP, the repo convention) builds the sample, runs
"$GODOT4" --headless --path <sample> --import once, then one test per scene
(--headless --path <sample> --scene res://Tests/Smoke/<X>.tscn --fixed-fps 60 --quit-after <cap> -- --scenario=<X>) with a timeout,
asserting exit code 0 and the result line. Tests skip when GODOT4 is unset locally; CI sets it and runs with --fail-skips. A
capture job (Xvfb) may upload frames as artifacts with no pixel assertions, because llvmpipe output varies with the Mesa version [I].
GdUnit4Net only for node-level input tests, in a project with a VSTest-mode global.json; GoDotTest is rejected for lack of a
dotnet test path [I, recommendation].
2.6 Generator output in the editor's type model
Run the project's source generators in the editor's compilation (a CSharpGeneratorDriver over hand sources plus fresh graph code,
with the project's analyzer references) so graphs see SignalName.X, PropertyName.X and generated events. Recorded as an owner
call and a roadmap item, not blocking; ADR-0038 decision 4 says the editor runs no generator probe and revisits it with this. Until
then, C# bases expose typed helpers, for example protected void RaiseShieldDepleted() => EmitSignal(SignalName.ShieldDepleted);,
and graphs call those. Code that needs it: src/NetPrints.Workspace/MsBuildProjectSystem.cs (analyzer references on the snapshot)
and src/NetPrints.Reflection (generator driver).
3. Open questions
- Default
Partialfor new classes: keepNone(recommendation) or change the core default. - "Add C# partial file" command: in P3 or later.
- Godot attributes from graphs: through the ADR-0039 extension (recommended) and what the Godot attribute descriptors need. Not
covered by any source here:
[Tool], export groups and categories, export hints and their argument shapes,[Icon],[Rpc], and how a Godot[Signal]delegate is declared in a graph (the schema had no delegate declarations). - Run-profile slice ahead of the rest of P3: the research recommended pulling it forward for the showcase. The owner later chose to play the game from a terminal and deferred NetPrints-side changes.
- First-run import: a sample build target or an "Import assets" profile.
- Run the project's source generators in the editor's type model (section 2.6).
- A
sample.jsonmanifest now or later, now that the roadmap definesnetprints-sample.jsonfor remote samples. - Which build directory the editor binary loads when NetPrints builds Release (stale-assembly risk, [I]), and what happens on a GodotSharp version mismatch (unverified).
- Whether MSBuildLocator's variables reach a Godot editor that rebuilds on Play and what happens when they do (inferred only).
- The cause of NPE001 on a copied sample (unproven).
- The macOS path: resolving the
.appbundle toContents/MacOS/Godotis documented; it has not been run on a Mac. - Behaviour of Godot's CLI flags on other versions: this note covers 4.7.2 and, for a few items, 4.3 only.
4. Corrections to earlier reports (kept so they are not repeated)
- The portable Godot profile with
--upwards: removed by 4.7.2 (E17). Use--path .with noworkingDirectory, or$(ProjectDir)from .NET 11. - The NPE001 "partial repro" with
-restore -getItem: an artefact of evaluation-only mode (E12); the cause remains unproven. - "
net10.0with Godot 4.3 is a risk": on 4.7.2,net10.0builds and runs (E10). - "Check Godot's rules for the
X.netpc.g.csfile name": settled, it can never match, so an anchor file is required.