Skip to main content

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 with 4.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.

RequirementEvidence
The class derives from GodotObject (assembly GodotSharp) through its base chainGENExtensionMethods.cs, TryGetGodotScriptClass [V]
partial on the declarationGENScriptPathAttributeGenerator.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-sensitivesame 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 scriptsGD0003, GENCommon.cs [V]
Any namespaceE3 [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 partial is 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.cs can never match: the file name without extension is Foo.netpc.g. Even with partial, the class gets its members generated but no [ScriptPath] and is not in AssemblyHasScripts (E2) [V]. Any *.g.cs name fails the same way.
  • A hand-written partial plus the generated partial works (E3, E4) [V]. A hand file Scripts/Foo.cs holding namespace Probe; public partial class Foo; and a graph file Graphs/Probe.Foo.netpc.g.cs holding public partial class Foo : Node3D gives [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 lacks partial, 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.uid next to every .cs under res://, generated graph files included (E8) [V]. An empty .gdignore in 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). A Speed export and a Hit signal declared in the graph file were generated, and the scene's Speed = 42 was applied (E3, E4). [GlobalClass] in the graph file registered class Foo with path res://Scripts/Foo.cs in global_script_class_cache.cfg (E5) [V].

1.2 What NetPrints can and cannot do today​

  • partial is modelled end to end: ClassModifiers.Partial = 64 (src/NetPrints.Core/Core/ClassGraph.cs:36-39), emitted by ClassTranslator.cs:183-186, JSON "modifiers": "Partial" (ClassDocument.cs:38), an inspector checkbox (ClassInspectorView.axaml:27-28, ClassInspectorViewModel.cs:127). New classes start with None (src/NetPrints.Core/Profiles/DefaultProjectProfile.cs:67-73) [V].
  • Attributes in graph data: none at the time of that research. schemas/netpc.v1.schema.json had no attributes and no delegate declarations, so a [Signal] delegate cannot be declared in a graph. Attributes came only from the experimental emitters (ClassTranslator.cs:110-113, ClassEmitContext.Attributes L39, MemberEmitContext.Attributes L51) [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's Project.Documents excludes generated documents [I]. So Godot's SignalName.X, PropertyName.X and 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 Executable profile (Visual Studio: path is the Godot .NET binary or %GODOT4%, working directory ., optional native debugging), a coreclr launch with "program": "${env:GODOT4}" and a dotnet build pre-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 run on SDK 10.0.400 already runs a first Executable profile on the (Library-type) Godot project: it builds, expands %GODOT_BIN%, uses the project folder as the working directory when workingDirectory is absent, and the game reads the -- args (E13) [V].
  • Godot runs the assembly dotnet build wrote to .godot/mono/temp/bin/Debug (E4, E13), so the game needs no Godot build step. Godot.NET.Sdk declares Configurations = 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 run has 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 -e on Play) could see them [I]; ProcessStartRequest cannot unset a variable.
  • On macOS Godot is a .app folder, so the executable is Godot.app/Contents/MacOS/Godot (an executablePath of the bundle must be resolved) [V DOCStutorials/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].
  • --upwards no longer exists in 4.7.2. It is absent from --help and from main/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 run resolves a relative workingDirectory from Properties/; 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 and dotnet run today omits workingDirectory and passes --path . (E13) [V].
  • An earlier experiment hard-coded a Godot executable lookup in the build system. ADR-0037's Executable profile replaces that.

Godot flags useful for automation (4.7.2 --help, DOCStutorials/editor/command_line_tutorial.html, DOCStutorials/animation/creating_movies.html) [V]:

FlagUseExperiment
--headlesslogic and smoke tests only (--display-driver headless --audio-driver Dummy)E4, E16
--scene <path or uid>run a specific sceneE14, E16
--path <dir>the project folderall
--quit-after <N>quit after N iterationsE14
--fixed-fps <fps>fixed delta, deterministic steppingE16
--write-movie <file>Movie Maker frames; forces fixed fpsE14
--rendering-driver opengl3, --rendering-method gl_compatibilityllvmpipe on XvfbE14
--resolution WxHdid not change the movie size; set the viewport in project.godotE14
-- <args> and OS.GetCmdlineUserArgs()scenario, seed, autopilotE4, E13, E16
GetTree().Quit(code)the process exit codeE16
--importeditor build: import assets, then quitE5, 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​

  • NeedsRestore hardcodes obj/project.assets.json (src/NetPrints.Workspace/MsBuildProjectSystem.cs:293-311) and runs before the in-process evaluation (L80, then L86). Godot sets BaseIntermediateOutputPath to .godot/mono/temp/obj/ when empty (SDKSdk.props L27-28), and evaluation gives ProjectAssetsFile = <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 moves BaseIntermediateOutputPath or uses UseArtifactsOutput hits the same.
  • An earlier audit's NPE001 "partial repro" (-restore -getItem returning 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.props correctly.
  • 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 Desktop bin, an offline or feed failure, or a copy built against the released generator.
  • In the repo, samples/Directory.Build.props and .targets import src/NetPrints.Sdk/build/* and the generator from src/NetPrints.Generator/bin/$(Configuration)/net10.0 (NetPrintsUseLocalSdk=true). A copy outside the repo uses the sample's PackageReference to NetPrints.Sdk, whose version SampleCatalog rewrites (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, because samples/Directory.Build.props sets NetPrintsGeneratorConfiguration=$(Configuration) and bin/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.props sets GodotProjectDir and GodotTargetPlatform defaults and no TargetFramework or LangVersion default (SDKSdk.props, fetched 2026-10-14), so a net8.0 project gets C# 12 unless it overrides LangVersion [V]. On 4.7.2, net10.0 builds 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 excluding bin, obj and Compiled_* (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.cfg held credentials only in 3.x and 4.0. The editor's "Generate Version Control Metadata" writes a .gitignore with .godot/ and /android/ and a .gitattributes with * text=auto eol=lf (https://raw.githubusercontent.com/godotengine/godot/4.3-stable/editor/editor_vcs_interface.cpp, L362-385) [V]. The github/gitignore Godot template also lists export_credentials.cfg, .import/ (3.x), mono_crash.*.json, data_*/ [V].
  • Keep in git: project.godot, *.tscn, *.tres, *.import files, *.uid files (4.4 and later; blog https://godotengine.org/article/uid-changes-coming-to-godot-4-4/) and export_presets.cfg when a preset exists [V].
  • Root build settings do not reach samples by design: samples/Directory.Build.props does not import the root props and samples/Directory.Packages.props turns central package management off. The root .editorconfig applies by path inside the repo (its [*.cs] sections set Sonar, IDISP and VSTHRD rules to suggestion; the curated error set is under [src/**.cs], .editorconfig L127, 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 on AddChild(new Timer { ... }) (the tree owns the node); S2325 on helpers once TreatWarningsAsErrors is on;
    • S109 catches WaitTime = 0.15, half > 3, x * 0.25f, but not [Export] initializers, new Color(0.2f, 0.8f, 1f) or float half = Thrust * 0.5f;
    • generated code (Godot's and NetPrints') got no Sonar hit;
    • BannedApiAnalyzers (RS0030) flags new Color(...) (doc id must be the 4-float overload) and GD.Print, in hand code and in .netpc.g.cs: banned-API checks also enforce rules on graph output (E19).

1.7 Testing a Godot sample headlessly​

  • GdUnit4Net is a VSTest adapter (gdUnit4.test.adapter) configured with GODOT_BIN and .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's global.json sets the MTP runner, so a VSTest project would need its own global.json [V; sources: the GdUnit4Net README and discussions on GitHub, gdUnit4/gdUnit4Net].
  • GoDotTest runs tests inside the game (--run-tests, coverlet) and has no dotnet test adapter [V, Chickensoft docs].
  • Plain Godot: --headless --scene <scene> --fixed-fps 60 -- --case=thrust with a script that calls GetTree().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 is Godot_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.

ItemStatus
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 sampleCause 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\** excludeOwner 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-circuitOwner-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 explainOwner 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 nowDecision, 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.cs name. The suffix is the generated-file marker in src/NetPrints.Sdk/build/NetPrints.Sdk.targets L8-10 (GeneratedFile, Compile Remove="**/*.netpc.g.cs"), in MsBuildProjectSystem.cs:416 and in CodeAnalysisSession; naming it Foo.cs would 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 partial and has a hand-owned <ClassName>.cs in the project, same namespace, containing public 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 no src/ 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.cs in a folder with an empty .gdignore (for example Blueprints/), anchors in Scripts/: no .netpc.g.cs.uid churn and the FileSystem dock does not offer generated files as scripts (E20).
  • Default Partial for 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.Partial through the undoable SetMemberProperty path, writes <ClassName>.cs next to the graph (namespace <Ns>; then public partial class <Name>;, or { } when LangVersion is below 12), never overwrites. It is the seam for any generator that requires partial (Godot, UnrealSharp [UClass], CommunityToolkit.Mvvm, [GeneratedRegex], [LoggerMessage]). Proposed home: src/NetPrints.Editor/Commands/AddPartialFileCommandHandler.cs registered in FileContributions.cs. ADR-0039 decision 7 and ADR-0038 mention the same need [I].
  • Pin today's behaviour with tests before relying on it: Partial plus a base type gives public partial class X : B; "modifiers": "Abstract, Partial" round-trips; a Partial graph class plus public partial class X; compiles, and without Partial gives 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 ." }
}
}
  • GODOT4 is the variable name Godot's docs use. No workingDirectory: see section 1.3. Visual Studio users set Working Directory . locally.

  • Order matters: the default is the first profile NetPrints can run, so Game first 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="&quot;$(GODOT4)&quot; --headless --path &quot;$(MSBuildProjectDirectory)&quot; --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 --import
    xvfb-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, -lp in 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, then obj/), restore if needed and re-evaluate only if a restore ran. Timestamp inputs stay the project file, Directory.* files and NuGet.config up the tree. Tests: a fixture whose Directory.Build.props sets BaseIntermediateOutputPath=build/obj/ restores once and a second load runs no restore; touching the csproj restores again [I, recommendation].
  • NPE001 without RestoreFailed should say what the evaluation found (for example NetPrintsSdkVersion empty, the PackageReference condition 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 temporary NuGet.config for local-packages, build and assert every graph generated. Map unknown configurations in samples/Directory.Build.props to 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 of git ls-files samples/<X>.
  • Optional sample.json manifest (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 (not TreatWarningsAsErrors, which would fail on Sonar defaults outside the repo), SonarAnalyzer.CSharp and BannedApiAnalyzers with explicit versions and PrivateAssets="all"; a non-root .editorconfig (S109, S1192, S1854, S1481, RS0030 at error; IDISP* and S2325 off, because the tree owns nodes and editor-connected signal handlers are instance methods); BannedSymbols.txt (Godot Color constructors, GD.Print*, raw key-code input such as Input.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​

  1. Default Partial for new classes: keep None (recommendation) or change the core default.
  2. "Add C# partial file" command: in P3 or later.
  3. 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).
  4. 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.
  5. First-run import: a sample build target or an "Import assets" profile.
  6. Run the project's source generators in the editor's type model (section 2.6).
  7. A sample.json manifest now or later, now that the roadmap defines netprints-sample.json for remote samples.
  8. Which build directory the editor binary loads when NetPrints builds Release (stale-assembly risk, [I]), and what happens on a GodotSharp version mismatch (unverified).
  9. Whether MSBuildLocator's variables reach a Godot editor that rebuilds on Play and what happens when they do (inferred only).
  10. The cause of NPE001 on a copied sample (unproven).
  11. The macOS path: resolving the .app bundle to Contents/MacOS/Godot is documented; it has not been run on a Mac.
  12. 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 no workingDirectory, or $(ProjectDir) from .NET 11.
  • The NPE001 "partial repro" with -restore -getItem: an artefact of evaluation-only mode (E12); the cause remains unproven.
  • "net10.0 with Godot 4.3 is a risk": on 4.7.2, net10.0 builds and runs (E10).
  • "Check Godot's rules for the X.netpc.g.cs file name": settled, it can never match, so an anchor file is required.