Ignacio Roldán Etcheverry 00058bb0ea Merge pull request #65168 from raulsntos/dotnet/float64 3 سال پیش
..
build_scripts d20b32186f [Web] Rename JavaScript platform to Web. 3 سال پیش
doc_classes f9a67ee9da C#: Begin move to .NET Core 3 سال پیش
editor 9a10701c69 C#: Assume 64-bit types when type has no meta 3 سال پیش
glue 0e63185651 C#: Fix Vector4 in godot_variant and missing marshaling 3 سال پیش
icons a1d9c67f43 Optimize SVG using `svgcleaner --multipass` 5 سال پیش
mono_gd 10a56981dc Rename String `plus_file` to `path_join` 3 سال پیش
utils 10a56981dc Rename String `plus_file` to `path_join` 3 سال پیش
.editorconfig e5e7a795b1 C#: Code cleanup and greatly reduce use of C# pointers 3 سال پیش
.gitignore 33c0d47273 Make git no longer ignore solution files inside the mono module 6 سال پیش
Directory.Build.props d78e0a8426 C#: Make GodotSharp API a NuGet package 3 سال پیش
Directory.Build.targets d78e0a8426 C#: Make GodotSharp API a NuGet package 3 سال پیش
README.md 9c34a02191 C#: Add module README 3 سال پیش
SCsub e235cef09f C#: Re-implement assembly reloading with ALCs 3 سال پیش
SdkPackageVersions.props d78e0a8426 C#: Make GodotSharp API a NuGet package 3 سال پیش
__init__.py 270af6fa08 Re-write mono module editor code in C# 6 سال پیش
class_db_api_json.cpp 860e24683f Make enum/constant binds 64-bit. 3 سال پیش
class_db_api_json.h fe52458154 Update copyright statements to 2022 4 سال پیش
config.py d20b32186f [Web] Rename JavaScript platform to Web. 3 سال پیش
csharp_script.cpp 10a56981dc Rename String `plus_file` to `path_join` 3 سال پیش
csharp_script.h a9892f2571 C#: Add source generator for method list 3 سال پیش
godotsharp_defs.h f88d8902cf C#: Ensure native handles are freed after switch to .NET Core 3 سال پیش
godotsharp_dirs.cpp 10a56981dc Rename String `plus_file` to `path_join` 3 سال پیش
godotsharp_dirs.h 1bf4397e5b C#: Use custom project setting for C# project files name 3 سال پیش
interop_types.h 124fbf95f8 C#: Move marshaling logic and generated glue to C# 3 سال پیش
managed_callable.cpp e235cef09f C#: Re-implement assembly reloading with ALCs 3 سال پیش
managed_callable.h f9a67ee9da C#: Begin move to .NET Core 3 سال پیش
mono_gc_handle.cpp f9a67ee9da C#: Begin move to .NET Core 3 سال پیش
mono_gc_handle.h 92503ae8db C#: Add source generator for properties and exports default values 3 سال پیش
register_types.cpp de0ca3b999 Refactor module initialization 3 سال پیش
register_types.h de0ca3b999 Refactor module initialization 3 سال پیش
signal_awaiter_utils.cpp f9a67ee9da C#: Begin move to .NET Core 3 سال پیش
signal_awaiter_utils.h 513ee857a9 C#: Restructure code prior move to .NET Core 3 سال پیش

README.md

How to build and run

  1. Build Godot with the module enabled: module_mono_enabled=yes.
  2. After building Godot, use it to generate the C# glue code:

    <godot_binary> --generate-mono-glue ./modules/mono/glue
    
  3. Build the C# solutions:

    ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin
    

The paths specified in these examples assume the command is being run from the Godot source root.

How to deal with NuGet packages

We distribute the API assemblies, our source generators, and our custom MSBuild project SDK as NuGet packages. This is all transparent to the user, but it can make things complicated during development.

In order to use Godot with a development of those packages, we must create a local NuGet source where MSBuild can find them. This can be done with the .NET CLI:

dotnet nuget add source ~/MyLocalNugetSource --name MyLocalNugetSource

The Godot NuGet packages must be added to that local source. Additionally, we must make sure there are no other versions of the package in the NuGet cache, as MSBuild may pick one of those instead.

In order to simplify this process, the build_assemblies.py script provides the following --push-nupkgs-local option:

./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin \
    --push-nupkgs-local ~/MyLocalNugetSource

This option ensures the packages will be added to the specified local NuGet source and that conflicting versions of the package are removed from the NuGet cache. It's recommended to always use this option when building the C# solutions during development to avoid mistakes.