C# API not compiling for double precision

Godot Version

4.2.2

Question

So I want to use the double precision version of Godot with C# and I followed the online documentation for compiling Godot with the required options:

However the C# API keeps compiling as the regular single-precision version and I have no idea what I’m doing wrong. For example, Vector3 still uses floats. When I try to assign a double to a coordinate, the project won’t build.

I found that someone ran into a similar issue here:

For them the issue turned out to be with cross-compiling to Windows, which I’m not doing.

I’m on Debian 12 compiling Godot 4.2.2 stable, these are the commands I ran:

scons platform=linuxbsd module_mono_enabled=yes precision=double
sudo ./bin/godot.linuxbsd.editor.double.x86_64.mono --headless --generate-mono-glue modules/mono/glue
sudo ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --precision=double

You need to configure your .NET environment so your local NuGet source takes precedence on NuGet.org. Otherwise, it is going to grab the package we distribute. Alternatively, you can change the status version field to something else to avoid the conflict. As explained in the GH issue you already linked (in which the issue is not about cross-compilation).

1 Like

Did it, still having the same issue. These are the bash commands I used

dotnet nuget add source ~/.localnuget --name .localnuget
sudo ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --push-nupkgs-local ~/.localnuget --precision=double

I also change status in version.py from stable to custom, still had no effect.

EDIT: I initially rebuilt the project with the local nuget source, which didn’t work, and then only built the assemblies after changing status in version.py. After rebuilding the whole project with this change however, it does now work. Thanks for the help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.