Current state of C# platform support in Godot 4.2

How many of you are using C# to program in Godot 4? :question:

This blogpost delves into the history of .NET and delivers the happy news that mobile support for C# is finally back :iphone:

:link: read the blog post


I am a C# software developer and I really like to use that language for game development. That was also the reason why I used Unity in the past.

Do I understand it correctly, that .NET 8 does not have a proper way to load the runtime on Android like the hosting API on Desktop? So there is still a Mono implementation necessary?

We’re currently using the same hosting API on Desktop as we do on Android: hostfxr. But hostfxr is only available on Android using the linux-bionic runtime which, as explained in the article, has some limitations:

  • Only supports the arm64 and x64 architectures.
  • Does not provide Android OS functions like JNI, which means some APIs are not available. Everything should work fine if you only use Godot APIs.

Just to be clear the runtime is still Mono and this is unrelated to the hosting API used. Desktop supports both Mono and the CoreCLR runtimes using the hostfxr hosting API. But CoreCLR is not available on mobile/web and Microsoft has no plans to bring it to those platforms.

Using the Mono embedding APIs seems to be the only way forward if we want to support 32-bit architectures and full BCL support. But this doesn’t require to bring back all the implementation we had in 3.x.

1 Like

Thank you for the answer. I did not expect Microsoft to stop halfway by not bringing CoreCLR to Android. What a bummer. I really thought they wanted to create one universal runtime since .NET Core instead of maintaining multiple runtimes.

1 Like

Made just my Account to share the Expiriance so far.

I enjoy the current implementation of C# in godot.
It is very intuitive.
The project im working on is a Space Sim with Physics and the workflow so far has been excellent.

Thank you for the work Godot Team and keep it up! Big Fan :grinning:

Will we be able to use CLR on desktop instead of mono?

@galnart CoreCLR is already available on desktop platforms (in fact, it’s the default runtime on these platforms). See the table included in the article for detailed information about which runtimes are supported on each platform.

Im hoping im not the only one looking forward to the day when godot 4 allows c# games to do web exports…