agentleFS
laaielichterlaaielichter/Reverseport/skills/unity-to-godot/SKILL.md

unity-to-godot

Skill23 starsChanged 4 days agoMITView on GitHub

Port a Unity project (C#) to Godot 4 with ReversePort — MonoBehaviours to GDScript (or Godot C#), prefabs and scenes to .tscn with converted transforms, colliders, rigidbodies and prefab instances, plus the Unity-to-Godot API map. Use for "move my Unity game to Godot" or any port whose source is a Unity project.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the port-project skill for the loop.

    line 8
  2. Very specific:

    Keep the .meta files: they map GUIDs to scripts and prefabs.

    line 14
  3. Very specific:

    Only a build, no project? re_archive on <Game>_Data/data.unity3d, sharedassets*.assets or an asset bundle lists every object, the scene …

    line 16
  4. Very specific:

    After writing each script, re_apicheck {path, engine: "godot@4.x"}: models mix Godot 3 (KinematicBody2D, instance(), yield, string connect) …

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Porting from Unity to Godot

Use the port-project skill for the loop; this skill holds the Unity-specific judgement.

Prepare the source

  • Scenes and prefabs must be text: Unity → Project Settings → Editor → Asset Serialization = Force Text. Without it re_scene cannot read them.
  • Keep the .meta files: they map GUIDs to scripts and prefabs. Run re_refs on the project first: a dangling GUID (missing script, pink material) is a component the port would silently lose; fix it in Unity before planning.
  • Only a build, no project? re_archive on <Game>_Data/data.unity3d, sharedassets*.assets or an asset bundle lists every object, the scene list and the C# scripts each MonoBehaviour uses; action:"extract" writes textures as PNG, audio and TextAssets, and meshes as OBJ where the file keeps type trees (bundles do; player builds strip them). Code still comes from re_binary (Mono) or re_il2cpp (IL2CPP).
  • GDScript or C#? Large, idiomatic C# codebases port faster to godot-csharp (only engine API calls change); smaller or designer-facing projects read better as GDScript (to:"godot").

What converts automatically

port_scene turns every .prefab and .unity into a .tscn: Rigidbody → RigidBody3D (kinematic → AnimatableBody3D), CharacterController → CharacterBody3D, trigger colliders → Area3D, other colliders → StaticBody3D, Box/Sphere/Capsule colliders → CollisionShape3D, built-in primitives → BoxMesh/SphereMesh/…, Camera, Light, AudioSource, tags → groups, prefab instances → instanced scenes, scripts → the ported script. Transforms are mirrored on Z. Prefab variants become inherited scenes (instance=) with m_IsActive applied and other overrides listed. uGUI becomes Control nodes: Canvas → full-rect Control, Image/RawImage → TextureRect, Text and TextMeshPro → Label (size, colour, alignment), Button → Button (label text, OnClick listed), Slider/Toggle/ ScrollRect/InputField/layout groups → HSlider/CheckBox/ScrollContainer/LineEdit/Box- and GridContainer, with RectTransform anchors and offsets converted (Y flipped). Animator → an AnimationPlayer whose library holds the ported clips plus an Animator child running the ported controller script. .anim files port to Godot Animation resources (position/rotation/scale/property/sprite-swap/event tracks); .controller files port to a GDScript state machine with the same states, parameters and transition conditions (blend trees and extra layers are listed for an AnimationTree by hand). Model meshes and materials stay flagged as metadata/reverseport_todo.

Code: the usual translations

After writing each script, re_apicheck {path, engine: "godot@4.x"}: models mix Godot 3 (KinematicBody2D, instance(), yield, string connect) into Godot 4 code and invent members; the tool names the replacement.

  • One GameObject with several MonoBehaviours → one node per behaviour (child nodes) or merge them into one script.
  • GetComponent<T>() → the node itself or a child ($Child); components are nodes in Godot.
  • [SerializeField] → @export; prefab fields (GameObject) → PackedScene.
  • Coroutines → await get_tree().create_timer(t).timeout; events/UnityEvent → signals.
  • OnTriggerEnter → the Area3D body_entered signal; Physics.Raycast → PhysicsRayQueryParameters3D.
  • transform.forward (+Z) → -global_basis.z; degrees → radians (deg_to_rad) or rotation_degrees.
  • Random.Range(int a, int b) excludes b; randi_range includes it.
  • Input Manager axes/buttons → Input Map actions (create them in Project Settings, same names).

Then verify with the port-verify skill and open the folder in Godot 4.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.