Code Translation Quest

Code Lab

Compare familiar C# patterns against concise GDScript equivalents.

10-20 min Practice first Godot 4.6

C# to GDScript Code Lab

Side-by-side comparisons between Unity C# and Godot 4 GDScript. Walk through how each pattern translates — variables, classes, signals, input handling, scene access, save and load — so the migration mental model snaps into place. Pair this with the full Unity to Godot migration guide and the GDScript cheat sheet.

💻

Live syntax comparison

Side-by-side syntax comparison

Unity C#
123456
public float speed = 5.0f;
private int health = 100;
[SerializeField]
private GameObject target;
[SerializeField]
private Sprite[] sprites;
GDScript ✨
1234
var speed := 5.0
var health := 100
@export var target: Node
@export var sprites: Array[Texture2D]
💡 @export = shows in Inspector (like [SerializeField])
ℹ️ Type inference with := (optional but recommended)

Quick Reference

_ready() = Start() / BeginPlay()
_process(delta) = Update() / Tick()
extends Node = : MonoBehaviour
@export var = [SerializeField]
$NodePath = GetComponent / FindChild
queue_free() = Destroy()
Tutor Checkpoint

Lock the pattern in

Before jumping to the next page, turn the idea into one tiny scene or script. That is where the Godot habit sticks.

Unity habit

Look for syntax that is only habit, not architecture.

Unreal habit

Treat graph nodes as control flow that often becomes a readable function.

Godot habit

Keep code close to the node that owns the behavior.

Try this

Copy one comparison into Code Sandbox and rename it for your own game.