Godot with C#/.net, VSCodium, and Ubuntu

This is my experience of getting Godot with C#/.net support working on Ubuntu, using VSCodium as a useful external code editor.

I am running Kubuntu 24.10. If your configuration differs from mine, you'll need to interpret this less as a series of instructions and more as a general guide.

Terminal commands look like this:

> this is the terminal command

Security Notice: Do not blindly run terminal commands because some blogger (including me) said to. Research the command first to be sure you understand the implications.

1. Install .NET SDK

  • If on Ubuntu 22.04 or 24.04 LTS:
    > sudo apt-get install software-properties-common
    > sudo add-apt-repository ppa:dotnet/backports
  • Then, in all cases:
    > sudo apt-get install dotnet-sdk-9.0 --update
  • Note: the specific version is not important, but you absolutely must install a recent stable version of the dotnet sdk before you start.

2. Get Godot from the official site

  • If you installed it already, uninstall it first. Don't get it from the package manager.
  • Open https://godotengine.org/download/linux and click the second download link (it says "Godot Engine - .NET").
  • Extract it to your home folder or somewhere you'll easily be able to find it again.

3. Get VSCodium

  • > sudo snap install codium
  • Or: install the snap called “codium” from Discover.
  • Note: It seems the terms "Codium" and "VSCodium" are used interchangably. I use VSCodium throughout this document for clarity.

4. Run VSCodium once

  • Go to File - Preferences - Extensions. You must install, as a minimum: C# (by muhammad-sammy), C# Tools for Godot (by neikeq), and godot-tools (by geequlim). Things will break if you miss any of these three extensions.
  • You don't need to restart VSCodium. Close it instead.

5. (Optional) Add Godot to your start menu

  • Note: Yes, I know it’s called the Kickoff Application Launcher. What’s important is that we both know what I’m talking about. Deal with it.
  • Right-click on the start button, select Edit Applications.
  • Double-click Development, then click New Item. Call it Godot.
  • Click the button next to "Program" and find the folder you extracted Godot into in step 2. In the folder, there should be one file (named Godot_v4.3-stable_mono_linux.x86_64 or similar), and one subfolder. Select the file.
  • You can, if you wish, give it an icon by clicking the large empty button to the right of Name and Description.
  • You can, if you wish, click Sort in the top-right while you're here, and choose Sort all by Name.
  • File - Save, then close the menu editor.

6. Run Godot

  • Use the shortcut you just made to open Godot. Or:
  • Go into the folder you extracted Godot into in step 2, and run Godot_v4.3-stable_mono_linux.x86_64 (or similar). You'll be asked to confirm you want to execute this unknown program.

7. Set up Godot to work with VSCodium

  • Open or create an empty project to continue. This is necessary to get past the welcome wizard and into the main interface.
  • Go to Editor - Editor Settings.
  • Scroll down the category list on the left and choose Text Editor - External.
  • Enable "Use External Editor".
  • Set Exec Path to: /snap/bin/codium
  • Set Exec Flag to: {project} --goto {file}:{line}:{col}

If everything went as planned, you will now automatically open VSCodium every time you try to edit a C# script in Godot's IDE.

Some Caveats

Godot:

  • Classes derived from Node must be declared as "partial" for Godot to use them properly.
  • If you're ever told a file's changed on disk and asked whether to reload or overwrite, the correct answer is "discard local changes and reload".
  • Godot will not automatically update. It’ll tell you when an update is available, and it’s up to you whether to update or not.

VSCodium:

  • You'll probably want to set up some kind of source control system. I am barely a programmer and I've never used source control, so I have no clue on this one.
  • You'll probably want more extensions, such as a janitor. One that was recommended to me is called "Roslynator" by josefpihrt-vscode. I haven't used it.
  • Search for the setting dotnet.server.useOmnisharp and turn it on. Roslynator won't work without it, and a few other extensions will complain. People say this should be the default.
  • Many extensions that are available for VSCode are also available for Codium. Those that aren't can be downloaded from https://marketplace.visualstudio.com/ - find the extension you want, and click the large green Download button in the header. Install them from the Extensions panel in VSCodium using its three dots menu - select Install from VSIX.