Menu

GDScript vs C# in Godot: Which Should You Learn?

Godot supports GDScript and C#. Compare syntax side by side, setup, speed, editor integration, platform support and career value, and see when to pick each, or mix both in one project.

This page includes runnable editors. Edit, run, and see output instantly.

Godot has two official scripting languages: GDScript, built into every copy of the engine, and C#, available in the .NET build. Both reach the whole engine API. GDScript is shorter, reloads instantly and is what almost every Godot tutorial uses. C# is faster for heavy computation, has stronger tooling and is the language of Unity and much of the software industry.

The Same Script in Both

A player with a health signal, in GDScript:

extends CharacterBody2D

signal died

@export var speed := 200.0
var health := 3

func _physics_process(delta):
	var direction := Input.get_vector("left", "right", "up", "down")
	velocity = direction * speed
	move_and_slide()

func take_damage(amount: int) -> void:
	health -= amount
	if health <= 0:
		died.emit()

And in C#:

using Godot;

public partial class Player : CharacterBody2D
{
    [Signal]
    public delegate void DiedEventHandler();

    [Export]
    public float Speed = 200.0f;

    private int _health = 3;

    public override void _PhysicsProcess(double delta)
    {
        Vector2 direction = Input.GetVector("left", "right", "up", "down");
        Velocity = direction * Speed;
        MoveAndSlide();
    }

    public void TakeDamage(int amount)
    {
        _health -= amount;
        if (_health <= 0)
            EmitSignal(SignalName.Died);
    }
}

The API is the same, with C# naming: move_and_slide() becomes MoveAndSlide(), velocity becomes Velocity, and get_node("Label") becomes GetNode<Label>("Label").

Side by Side

GDScriptC#
Setupbuilt in, nothing to installthe .NET build of Godot plus the .NET SDK
EditorGodot's script editor, with full autocompletionan external IDE (Visual Studio, Rider, VS Code)
Change and testsave and run; scripts reload while the game runsrebuild the project first
Typingoptional, checked when usedalways static
Speed for heavy mathsloweroften several times faster
LibrariesGodot API and Asset Library addonsthe Godot API plus NuGet packages
Tutorials and examplesnearly all Godot materialfewer, growing
Skills outside GodotnoneUnity, .NET and general software jobs

Speed

C# runs on .NET with a JIT compiler, so loops over big arrays, pathfinding on large grids and procedural generation run much faster than in GDScript. Most game code, though, spends its time inside the engine: moving bodies, playing animations, drawing sprites. Both languages call the same C++ engine for that work, so the difference there is small. Typed GDScript runs faster than untyped, which helps:

333328333350000
took under 1 second: true

A loop of 100,000 steps is no problem for GDScript. Reach for C# (or C++ through GDExtension) when profiling shows a hot spot, not up front.

Platform Support

GDScript runs everywhere Godot exports. C# support has historically lagged behind: for most of Godot 4's history, C# projects could not export to the web, and mobile support arrived later than for GDScript. Check Godot's current documentation for C# on your target platforms before you commit a project to it.

Mixing Both

The .NET build runs GDScript and C# in the same project. A C# script can call a GDScript node's methods, and both can connect to each other's signals. A common pattern is writing the game in GDScript and moving one slow system, such as world generation, to C#.

Which Should You Learn?

Learn GDScript first if:

  • Godot is your first engine or programming is new to you;
  • you want to follow Godot tutorials and the official docs as written;
  • you want the fastest loop from an idea to a running game.

Choose C# if:

  • you already know C# or Java;
  • you may move to Unity, or want skills for software jobs outside games;
  • your game has heavy simulation or generation code.

Knowing one makes the other easy: the engine, the nodes and the API are the same.

Learn on Coddy

  • Learn GDScript: the language from variables to classes and signals, on a real Godot engine in your browser.
  • Learn Unity with C#: Unity scripting in C#, with the 3D game next to your code.

New to C#? The C# docs cover the language itself.

Frequently Asked Questions

Should I use GDScript or C# in Godot?

For most people, GDScript: it is built in, every tutorial uses it, it reloads instantly and it works on every platform Godot exports to. Choose C# if you already know it, plan to move to Unity, or write heavy algorithms where its speed matters.

Is C# faster than GDScript?

For pure computation such as pathfinding on large grids or procedural generation, yes, often several times faster. For typical game code that mostly calls the engine (moving nodes, playing animations, reacting to signals), the difference is small. Typed GDScript closes part of the gap.

Can I use GDScript and C# in the same Godot project?

Yes, with the .NET build of Godot. Each script is in one language, and scripts can call each other's methods and connect to each other's signals. Many teams write most of the game in GDScript and move hot spots to C#.

Do I need a different Godot download for C#?

Yes. C# needs the .NET build of Godot (labelled .NET on the download page) and the .NET SDK installed. The standard build only runs GDScript.

Coddy programming languages illustration

Learn to code with Coddy

Get started