Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot 4 Web .NET prototype

This is a demo project to showcase exporting C# projects to the web platform. It was built using the new web export support coming to Godot 4.

Inspired by SharpLab, the demo uses Roslyn to compile arbitraty C# code at runtime and invokes it using the Mono interpreter.

Note

The demo requires multi-threading support which uses an experimental Mono runtime.

See more information about web exports for C# projects in the Live from GodotCon Boston: Web .NET prototype blog article and the Pull Request GH-106125 that implements it.

Try the demo on your browser

Try it out on https://lab.godotengine.org/godot-dotnet-web/

Export the project

Requirements:

  • Godot editor and template that supports exporting C# projects to web.
  • .NET SDK 9.0+ with wasm-tools workload installed.

Caution

Currently, the output index.js file needs to be manually edited to remove the DOTNET.setup call.

Export the game from the Godot editor's export dialog or use this command on a console:

godot --headless --export-release "Web" "out/index.html"

Note

The output path out/index.html puts the exported project under the out directory.

You can also use the provided serve.py python script to serve the exported project on the local machine with a basic web server. This script was taken from the main Godot repository.

python serve.py --root out

Note

The --root option specifies the directory that contains the exported project.

Third party notices

This project includes resources such as the .NET logo that is owned by the Microsoft corporation with no affiliation to this demo.

See also THIRD-PARTY-NOTICES.

About

Demo C# project for Godot 4 web exports

Resources

Stars

48 stars

Watchers

8 watching

Forks

Contributors

Languages