Skip to content

Add web export support for C# #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Muggyfox1 opened this issue Nov 20, 2024 · 5 comments
Open

Add web export support for C# #68

Muggyfox1 opened this issue Nov 20, 2024 · 5 comments

Comments

@Muggyfox1
Copy link

Muggyfox1 commented Nov 20, 2024

Describe the project you are working on

small C# projects I want to easily share with others.

Describe the problem or limitation you are having in your project

Web export for C# is not supported

Describe the feature / enhancement and how it helps to overcome the problem or limitation

support export to web for C# projects.

Quick chart comparison for end user, no web export vs web export
Untitled Diagram drawio

This will

  1. Allow easier sharing for C# games
    a. if it's a mono issue, this also opens the door to any other language that can compile done to mono
  2. Makes game jams easier to join when using C#
  3. this is a feature that GDscript has over C#, This would make it more welcoming to people who know C#, want to make web games and not learn GDscript.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Export a project for web as normal, regardless of being GDscript or C#.
The experience should be seamless between the two (optimally, it should be seamless regardless of language).

If this enhancement will not be used often, can it be worked around with a few lines of script?

I am not currently aware of a work around.

Is there a reason why this should be core and not an add-on in the asset library?

Web is a large platform that should be able to run out of the box.

This is a major downside for developers when looking at using the engine w/ mono, if added in from the start, that downside is fixed.

Web games are the easiest way to play a game as an end user.
Many developers have C# knowledge, but will be cut off from publishing to web platforms because of this missing feature unless they want to learn GDScript to do it.

blockers

this issue seems to be the main blocker upstream.
dotnet/runtime#75257

To my understanding, Godot runs C++ and then launches the C# code from C++. This isn't possible yet in WASM.

@Spartan322
Copy link
Member

Spartan322 commented Nov 23, 2024

This is a dotnet sourced problem, not an engine problem, there's nothing that can be done until Microsoft resolves it with dotnet.

@WithinAmnesia
Copy link

Effectively would Godot 4x, 5.x C# GDextension Application Unification solve the C# parity / solve C# web support for Redot come when it should release for ~Godot / Redot ~4.4 ~4.5, ~4.6+ for 2025, 2026+ etc.?
Godot 4x, 5.x C# GDextension Application Unification:
https://github.com/raulsntos/godot-dotnet
godotengine#8191
godotengine#7895
https://godotengine.org/priorities/#dotnet
https://chat.godotengine.org/channel/dotnet

@Delsin-Yu
Copy link

C# GDextension Application Unification solve C# web support

No, the underlying technical issues that prevent the Godot / Redot WASM build from calling the C# compiled WASM DLL are the same. At this level, there isn't any difference between using GodotSharp / RedotSharp and GDExtension / RDExtension as they use the same technology to invoke C# codes.

Moving to GDExtension / RDExtension only simplifies the work of maintaining the binding layer.

@WithinAmnesia
Copy link

WithinAmnesia commented Apr 17, 2025

C# GDextension Application Unification solve C# web support

No, the underlying technical issues that prevent the Godot / Redot WASM build from calling the C# compiled WASM DLL are the same. At this level, there isn't any difference between using GodotSharp / RedotSharp and GDExtension / RDExtension as they use the same technology to invoke C# codes.

Moving to GDExtension / RDExtension only simplifies the work of maintaining the binding layer.

Can this (Godot / Redot 4.x C# Mirror / Mirage) be ported to Godot / Redot 4.x C# right away and later still be future proofed when moved to Godot / Redot 4.x with C# as a GDextension; without having to have a required / forced massive code rewrites for creative community to endure to support the systems needed for large scale / very complex projects such as MMORPGs with this Godot / Redot 4.x C# version of Mirror / Mirage Networking (a MMORPG template / tool that started in Unity but can also now work with Godot / Redot 4.x C#: https://github.com/James-Frowen/Mirage.Godot )?

@Delsin-Yu
Copy link

I'm having trouble understanding your sentences because you use too many nested subordinate clauses.
However, suppose you are asking about the cost of migrating from GodotSharp projects to the new godot-dotnet binding, in that case, there is not enough information to answer your question, as the godot-dotnet project is at a very early stage of development, and no one knows what the final API will look like, let alone the migration cost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants