Ignacio Roldán Etcheverry ec521a405a Merge pull request #68253 from dzil123/fix_array_shuffle 3 anos atrás
..
build_scripts 340f62d1ec .NET: Generate SdkPackageVersions.props from version.py 3 anos atrás
doc_classes f9a67ee9da C#: Begin move to .NET Core 3 anos atrás
editor 5947f22be9 Merge pull request #67578 from KoBeWi/GEDITOR 3 anos atrás
glue ec521a405a Merge pull request #68253 from dzil123/fix_array_shuffle 3 anos atrás
icons a1d9c67f43 Optimize SVG using `svgcleaner --multipass` 5 anos atrás
mono_gd 282bd37e5c C#: Remove need for reflection to invoking callable delegates 3 anos atrás
thirdparty f784fb2000 C#: Replace libnethost dependency to find hostfxr 3 anos atrás
utils 49fcf4ffad Style: Cleanup header guards for consistency 3 anos atrás
.editorconfig e5e7a795b1 C#: Code cleanup and greatly reduce use of C# pointers 3 anos atrás
.gitignore 340f62d1ec .NET: Generate SdkPackageVersions.props from version.py 3 anos atrás
Directory.Build.props d78e0a8426 C#: Make GodotSharp API a NuGet package 3 anos atrás
Directory.Build.targets fbea89d4f1 C#: Generate symbols packages 3 anos atrás
README.md c71b78bbb8 Add float arg to build_assemblies.py 3 anos atrás
SCsub 39facb35a0 SCons: Unify tools/target build type configuration 3 anos atrás
__init__.py 270af6fa08 Re-write mono module editor code in C# 6 anos atrás
class_db_api_json.cpp fe56c1ff75 Use `JSON::stringify` where possible 3 anos atrás
class_db_api_json.h fe52458154 Update copyright statements to 2022 4 anos atrás
config.py 39facb35a0 SCons: Unify tools/target build type configuration 3 anos atrás
csharp_script.cpp 5bf95518fd GDScript/C#: Tweak error message for invalid script type for object 3 anos atrás
csharp_script.h 82b87d7a17 Remove unsupported `NO_SAFE_CAST`/`-fno-rtti` from Android build 3 anos atrás
godotsharp_defs.h f88d8902cf C#: Ensure native handles are freed after switch to .NET Core 3 anos atrás
godotsharp_dirs.cpp e48c5daddf Unify usage of GLOBAL/EDITOR_GET 3 anos atrás
godotsharp_dirs.h 6daf4c6593 [.NET Export] Improve .NET export process. 3 anos atrás
interop_types.h 124fbf95f8 C#: Move marshaling logic and generated glue to C# 3 anos atrás
managed_callable.cpp 282bd37e5c C#: Remove need for reflection to invoking callable delegates 3 anos atrás
managed_callable.h 282bd37e5c C#: Remove need for reflection to invoking callable delegates 3 anos atrás
mono_gc_handle.cpp f9a67ee9da C#: Begin move to .NET Core 3 anos atrás
mono_gc_handle.h 92503ae8db C#: Add source generator for properties and exports default values 3 anos atrás
register_types.cpp de0ca3b999 Refactor module initialization 3 anos atrás
register_types.h de0ca3b999 Refactor module initialization 3 anos atrás
signal_awaiter_utils.cpp dd26ecdd31 Rename CONNECT_ONESHOT TO CONNECT_ONE_SHOT 3 anos atrás
signal_awaiter_utils.h 513ee857a9 C#: Restructure code prior move to .NET Core 3 anos atrás

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.

Double Precision Support (REAL_T_IS_DOUBLE)

Follow the above instructions but build Godot with the float=64 argument to scons

When building the NuGet packages, specify --float=64 - for example:

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