You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
C#/netcore: Add base desktop game export implementation
This base implementation is still very barebones but it defines the path for how exporting will work (at least when embedding the .NET runtime). Many manual steps are still needed, which should be automatized in the future. For example, in addition to the API assemblies, now you also need to copy the GodotPlugins assembly to each game project.
This commit is contained in:
@@ -17,6 +17,9 @@ namespace Godot.SourceGenerators
|
||||
if (context.AreGodotSourceGeneratorsDisabled())
|
||||
return;
|
||||
|
||||
if (context.IsGodotToolsProject())
|
||||
return;
|
||||
|
||||
// NOTE: NotNullWhen diagnostics don't work on projects targeting .NET Standard 2.0
|
||||
// ReSharper disable once ReplaceWithStringIsNullOrEmpty
|
||||
if (!context.TryGetGlobalAnalyzerProperty("GodotProjectDir", out string? godotProjectDir)
|
||||
@@ -31,7 +34,7 @@ namespace Godot.SourceGenerators
|
||||
tree.GetRoot().DescendantNodes()
|
||||
.OfType<ClassDeclarationSyntax>()
|
||||
// Ignore inner classes
|
||||
.Where(cds => !(cds.Parent is ClassDeclarationSyntax))
|
||||
.Where(cds => !cds.IsNested())
|
||||
.SelectGodotScriptClasses(context.Compilation)
|
||||
// Report and skip non-partial classes
|
||||
.Where(x =>
|
||||
|
||||
Reference in New Issue
Block a user