Godotwright

Godot 3 to Godot 4

Port your project with the real Godot 4 API.

Find old syntax and names before they become runtime surprises. Godotwright rewrites the mechanical part of a port with migrate, reviews GDScript against its bundled Godot 4.7 reference and gives replacement hints for the rest.

Review a project you are porting

Back up or commit your Godot 3 project first, then follow the official Godot migration guide. Use Node.js 22.12 or newer to review the project without installing Godot or configuring a model/API key:

npx -y godotwright migrate /path/to/your-project          # shows the rewrites and what is left
npx -y godotwright migrate /path/to/your-project --write  # applies them
npx -y godotwright review /path/to/your-project

migrate turns export, onready and tool into annotations, renames classes, functions, properties and constants that no longer exist in Godot 4, rewrites yield() to await and connect(), emit_signal() and funcref() to signals and callables, and moves members such as OS.get_ticks_msec(). It leaves strings, comments and node paths alone and lists what still needs a hand (setget, move_and_slide(velocity), RPC keywords). Scenes and project settings are not converted; Godot's own --convert-3to4 does those.

Pass the directory containing project.godot. Follow each finding's file and line number, update the code, and run the review again. Look up a replacement with npx -y godotwright api CharacterBody2D. A review is static analysis; it does not replace opening the converted project in the matching Godot version and testing gameplay. Native validation with godotwright check requires Godot 4.7.

GDScript syntax changes

These are the Godot 3 forms recognized by the review's api/godot3-syntax rule. Adapt annotations and RPC options to your project's behavior.

  1. export var is @export var in Godot 4.
  2. onready var is @onready var in Godot 4.
  3. tool is @tool in Godot 4.
  4. setget is gone in Godot 4; use var x: T: set = _set_x, get = _get_x or set()/get blocks.
  5. yield() is await in Godot 4, e.g. await get_tree().create_timer(1.0).timeout.
  6. PackedScene.instance() is instantiate() in Godot 4.
  7. network keywords are @rpc(...) annotations in Godot 4.
  8. funcref() is a Callable in Godot 4: object.method or Callable(object, "method").
  9. connect("signal", target, "method") is signal_name.connect(target.method) in Godot 4.
  10. .method() super calls are super.method() in Godot 4.

APIs that moved

Use the new owner or property. Choose the getter or setter appropriate to the original access. Timestamp APIs differ in units: Time.get_unix_time_from_system() returns seconds, so preserve any required milliseconds conversion when replacing OS.get_system_time_msecs().

Moved members recognized by this review
Godot 3Godot 4
Engine.editor_hintEngine.is_editor_hint()
OS.get_dateTime.get_date_dict_from_system()
OS.get_datetimeTime.get_datetime_dict_from_system()
OS.get_screen_sizeDisplayServer.screen_get_size()
OS.get_system_time_msecsTime.get_unix_time_from_system()
OS.get_ticks_msecTime.get_ticks_msec()
OS.get_ticks_usecTime.get_ticks_usec()
OS.get_timeTime.get_time_dict_from_system()
OS.get_unix_timeTime.get_unix_time_from_system()
OS.max_window_sizeget_window().max_size
OS.min_window_sizeget_window().min_size
OS.set_window_titleDisplayServer.window_set_title() or get_window().title
OS.vsync_enabledDisplayServer.window_set_vsync_mode()
OS.window_borderlessget_window().borderless
OS.window_fullscreenDisplayServer.window_set_mode()
OS.window_positionget_window().position
OS.window_sizeDisplayServer.window_get_size() / window_set_size()

Renamed classes

The bundled API maps these Godot 3 class names to their Godot 4 names. Renaming a class is only a starting point: method signatures and behavior can also change. For example, CharacterBody2D.move_and_slide() takes no velocity argument; set velocity first.

Class renames from the bundled API data
Godot 3Godot 4
ARVRAnchorXRAnchor3D
ARVRCameraXRCamera3D
ARVRControllerXRController3D
ARVRInterfaceXRInterface
ARVRInterfaceGDNativeNode3D
ARVROriginXROrigin3D
ARVRPositionalTrackerXRPositionalTracker
ARVRServerXRServer
AStarAStar3D
AnimatedSpriteAnimatedSprite2D
AreaArea3D
AudioStreamOGGVorbisAudioStreamOggVorbis
AudioStreamRandomPitchAudioStreamRandomizer
AudioStreamSampleAudioStreamWAV
BakedLightmapLightmapGI
BakedLightmapDataLightmapGIData
BitmapFontFontFile
BoneAttachmentBoneAttachment3D
BoxShapeBoxShape3D
CPUParticlesCPUParticles3D
CSGBoxCSGBox3D
CSGCombinerCSGCombiner3D
CSGCylinderCSGCylinder3D
CSGMeshCSGMesh3D
CSGPolygonCSGPolygon3D
CSGPrimitiveCSGPrimitive3D
CSGShapeCSGShape3D
CSGSphereCSGSphere3D
CSGTorusCSGTorus3D
CameraCamera3D
CapsuleShapeCapsuleShape3D
ClippedCameraCamera3D
CollisionObjectCollisionObject3D
CollisionPolygonCollisionPolygon3D
CollisionShapeCollisionShape3D
ConcavePolygonShapeConcavePolygonShape3D
ConeTwistJointConeTwistJoint3D
ConvexPolygonShapeConvexPolygonShape3D
CubeMapCubemap
CubeMeshBoxMesh
CylinderShapeCylinderShape3D
DirectionalLightDirectionalLight3D
DirectoryDirAccess
DynamicFontFontFile
DynamicFontDataFontFile
EditorNavigationMeshGeneratorNavigationMeshGenerator
EditorSceneImporterEditorSceneFormatImporter
EditorSceneImporterFBXEditorSceneFormatImporterFBX2GLTF
EditorSceneImporterGLTFEditorSceneFormatImporterGLTF
EditorSpatialGizmoEditorNode3DGizmo
EditorSpatialGizmoPluginEditorNode3DGizmoPlugin
GIProbeVoxelGI
GIProbeDataVoxelGIData
Generic6DOFJointGeneric6DOFJoint3D
GeometryInstanceGeometryInstance3D
GradientTextureGradientTexture2D
HeightMapShapeHeightMapShape3D
HingeJointHingeJoint3D
ImmediateGeometryImmediateMesh
ImmediateGeometry3DImmediateMesh
InterpolatedCameraCamera3D
InterpolatedCamera3DCamera3D
JSONParseResultJSON
JointJoint3D
KinematicBodyCharacterBody3D
KinematicBody2DCharacterBody2D
KinematicCollisionKinematicCollision3D
LargeTextureImageTexture
LightLight3D
Light2DPointLight2D
LineShape2DWorldBoundaryShape2D
ListenerAudioListener3D
Listener2DAudioListener2D
MeshInstanceMeshInstance3D
MultiMeshInstanceMultiMeshInstance3D
MultiplayerPeerGDNativeMultiplayerPeerExtension
Navigation2DServerNavigationServer2D
NavigationAgentNavigationAgent3D
NavigationMeshInstanceNavigationRegion3D
NavigationObstacleNavigationObstacle3D
NavigationPolygonInstanceNavigationRegion2D
NavigationRegionNavigationRegion3D
NavigationServerNavigationServer3D
NetworkedMultiplayerCustomMultiplayerPeerExtension
NetworkedMultiplayerENetENetMultiplayerPeer
NetworkedMultiplayerPeerMultiplayerPeer
OccluderOccluderInstance3D
OmniLightOmniLight3D
OpenSimplexNoiseFastNoiseLite
PHashTranslationOptimizedTranslation
PacketPeerGDNativePacketPeerExtension
PanoramaSkySky
Particles2DGPUParticles2D
ParticlesMaterialParticleProcessMaterial
PathPath3D
PathFollowPathFollow3D
PhysicalBonePhysicalBone3D
Physics2DDirectBodyStatePhysicsDirectBodyState2D
Physics2DDirectSpaceStatePhysicsDirectSpaceState2D
Physics2DServerPhysicsServer2D
Physics2DServerSWGodotPhysicsServer2D
Physics2DShapeQueryParametersPhysicsShapeQueryParameters2D
Physics2DTestMotionResultPhysicsTestMotionResult2D
PhysicsBodyPhysicsBody3D
PhysicsDirectBodyStatePhysicsDirectBodyState3D
PhysicsDirectSpaceStatePhysicsDirectSpaceState3D
PhysicsServerPhysicsServer3D
PhysicsShapeQueryParametersPhysicsShapeQueryParameters3D
PhysicsTestMotionResultPhysicsTestMotionResult3D
PinJointPinJoint3D
PlaneShapeWorldBoundaryShape3D
PopupDialogPopup
Position2DMarker2D
Position3DMarker3D
ProceduralSkySky
RayCastRayCast3D
RayShapeSeparationRayShape3D
RayShape2DSeparationRayShape2D
ReferenceRefCounted
RemoteTransformRemoteTransform3D
ResourceInteractiveLoaderResourceLoader
RigidBodyRigidBody3D
SceneTreeTweenTween
ShapeShape3D
ShortCutShortcut
SkeletonSkeleton3D
SkeletonIKSkeletonIK3D
SliderJointSliderJoint3D
SoftBodySoftBody3D
SpatialNode3D
SpatialGizmoNode3DGizmo
SpatialMaterialStandardMaterial3D
SphereShapeSphereShape3D
SpotLightSpotLight3D
SpringArmSpringArm3D
SpriteSprite2D
StaticBodyStaticBody3D
StreamCubemapCompressedCubemap
StreamCubemapArrayCompressedCubemapArray
StreamPeerGDNativeStreamPeerExtension
StreamPeerSSLStreamPeerTLS
StreamTextureCompressedTexture2D
StreamTexture2DCompressedTexture2D
StreamTexture2DArrayCompressedTexture2DArray
StreamTextureLayeredCompressedTextureLayered
TCP_ServerTCPServer
TabsTabBar
TextFileNode3D
TextureTexture2D
TextureArrayTexture2DArray
TextureProgressTextureProgressBar
ToolButtonButton
VehicleBodyVehicleBody3D
VehicleWheelVehicleWheel3D
VideoPlayerVideoStreamPlayer
ViewportSubViewport
ViewportContainerSubViewportContainer
VisibilityEnablerVisibleOnScreenEnabler3D
VisibilityEnabler2DVisibleOnScreenEnabler2D
VisibilityNotifierVisibleOnScreenNotifier3D
VisibilityNotifier2DVisibleOnScreenNotifier2D
VisibilityNotifier3DVisibleOnScreenNotifier3D
VisualInstanceVisualInstance3D
VisualServerRenderingServer
VisualShaderNodeBooleanUniformVisualShaderNodeBooleanParameter
VisualShaderNodeColorUniformVisualShaderNodeColorParameter
VisualShaderNodeCubeMapVisualShaderNodeCubemap
VisualShaderNodeCubemapUniformVisualShaderNodeCubemapParameter
VisualShaderNodeScalarClampVisualShaderNodeClamp
VisualShaderNodeScalarConstantVisualShaderNodeFloatConstant
VisualShaderNodeScalarFuncVisualShaderNodeFloatFunc
VisualShaderNodeScalarInterpVisualShaderNodeMix
VisualShaderNodeScalarOpVisualShaderNodeFloatOp
VisualShaderNodeScalarSmoothStepVisualShaderNodeSmoothStep
VisualShaderNodeScalarSwitchVisualShaderNodeSwitch
VisualShaderNodeScalarTransformMultVisualShaderNodeTransformOp
VisualShaderNodeScalarUniformVisualShaderNodeFloatParameter
VisualShaderNodeTextureUniformVisualShaderNodeTexture2DParameter
VisualShaderNodeTextureUniformTriplanarVisualShaderNodeTextureParameterTriplanar
VisualShaderNodeTransformMultVisualShaderNode
VisualShaderNodeTransformUniformVisualShaderNodeTransformParameter
VisualShaderNodeUniformVisualShaderNodeParameter
VisualShaderNodeUniformRefVisualShaderNodeParameterRef
VisualShaderNodeVec3UniformVisualShaderNodeVec3Parameter
VisualShaderNodeVectorClampVisualShaderNodeClamp
VisualShaderNodeVectorInterpVisualShaderNodeMix
VisualShaderNodeVectorScalarMixVisualShaderNodeMix
VisualShaderNodeVectorScalarSmoothStepVisualShaderNodeSmoothStep
VisualShaderNodeVectorScalarStepVisualShaderNodeStep
VisualShaderNodeVectorSmoothStepVisualShaderNodeSmoothStep
WebRTCDataChannelGDNativeWebRTCDataChannelExtension
WebRTCMultiplayerWebRTCMultiplayerPeer
WebRTCPeerConnectionGDNativeWebRTCPeerConnectionExtension
WindowDialogWindow
XRAnchorXRAnchor3D
XRControllerXRController3D
XROriginXROrigin3D
YSortNode2D

Keep reviewing as you migrate

A clean static report is not a guarantee that the port is complete. Check scenes, resources, physics and rendering in Godot, and play-test each migrated feature. See all Godotwright tools and the official migration guide for the engine changes.