Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Mise à niveau de Godot 4.5 vers Godot 4.6

Pour la plupart des jeux et applications fabriqués en 4.5, il devrait être relativement sûr de migrer en 4.6. Cette page a l'intention de couvrir tout ce dont vous avez besoin de faire attention à lors de la migration de votre projet.

Changements incompatibles

Si vous migrez de la 4.5 à la 4.6, les changements cassants énumérés ici pourraient vous affecter. Les changements sont regroupés par zones/systèmes.

This article indicates whether each breaking change affects GDScript and whether the C# breaking change is binary compatible or source compatible:

  • Binary compatible - Existing binaries will load and execute successfully without recompilation, and the run-time behavior won't change.

  • Compatible source - Le code source compilera avec succès sans changement lors de la mise à niveau de Godot.

Core

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

FileAccess

La méthode create_temp change le type du paramètre mode_flags de int en FileAccess.ModeFlags

✔️

✔️

✔️

GH-101531

La méthode get_as_text supprime le paramètre skip_cr

✔️

✔️

✔️

GH-110867

Performance

La méthode add_custom_monitor ajoute un nouveau paramètre optionnel type

✔️

✔️

✔️

GH-110433

Animation

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

AnimationPlayer

La propriété assigned_animation change de type, de String` à StringName

✔️

GH-110767

La propriété autoplay change de type, de String à StringName

✔️

GH-110767

La propriété current_animation change de type, de String` à StringName

✔️

GH-110767

La méthode get_queue change de type de renvoi de PackedStringArray en StringName[]

✔️

GH-110767

La méthode current_animation_changed change le type du paramètre name de String à StringName

✔️

GH-110767

3D

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

SpringBoneSimulator3D

La méthode get_end_bone_direction change de type de renvoie de SpringBoneSimulator3D.BoneDirection en SkeletonModifier3D.BoneDirection

✔️

✔️

GH-110120

La méthode get_joint_rotation_axis change de type de renvoie de SpringBoneSimulator3D.RotationAxis en SkeletonModifier3D.RotationAxis

✔️

✔️

GH-110120

La méthode get_rotation_axis change de type de retour de SpringBoneSimulator3D.RotationAxis en SkeletonModifier3D.RotationAxis

✔️

✔️

GH-110120

La méthode set_end_bone_direction change le type du paramètre bone_direction de SpringBoneSimulator3D.BoneDirection en SkeletonModifier3D.BoneDirection

✔️

✔️

GH-110120

La méthode set_joint_rotation_axis change le type du paramètre axis de SpringBoneSimulator3D.RotationAxis en SkeletonModifier3D.RotationAxis

✔️

✔️

GH-110120

La méthode set_rotation_axis change le type du paramètre axis de SpringBoneSimulator3D.RotationAxis en SkeletonModifier3D.RotationAxis

✔️

✔️

GH-110120

Rendu

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

DisplayServer

La méthode accessibility_create_sub_text_edit_elements ajoute un nouveau paramètre optionnel is_last_line

✔️

✔️

✔️

GH-113459

La méthode tts_speak change le type du paramètre utterance_id de int32 en int64

✔️

✔️

✔️

GH-112379

Nœuds GUI

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

Contrôle

La méthode grab_focus ajoute un nouveau paramètre optionnel hide_focus

✔️

✔️

✔️

GH-110250

La méthode has_focus ajoute un nouveau paramètre optionnel free_submenus

✔️

✔️

✔️

GH-110250

FileDialog

La méthode add_filter ajoute un nouveau paramètre optionnel mime_type

✔️

✔️

✔️

GH-111439

LineEdit

La méthode edit ajoute un nouveau paramètre optionnel hide_focus

✔️

✔️

✔️

GH-111117

SplitContainer

La méthode clamp_split_offset ajoute un nouveau paramètre optionnel priority_index

✔️

✔️

✔️

GH-90411

Réseau

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

StreamPeerTCP

La méthode disconnect_from_host a été déplacée dans la classe parente StreamPeerSocket

✔️

✔️

✔️

GH-107954

La méthode get_status a été déplacée dans la classe parente StreamPeerSocket

✔️

✔️

GH-107954

La méthode poll a été déplacée dans la classe parente StreamPeerSocket

✔️

✔️

✔️

GH-107954

TCPServer

La méthode is_connection_available a été déplacée dans la classe parente SocketServer

✔️

✔️

✔️

GH-107954

La méthode is_listening a été déplacée dans la classe parente SocketServer

✔️

✔️

✔️

GH-107954

La méthode stop a été déplacée dans la classe parente SocketServer

✔️

✔️

✔️

GH-107954

OpenXR

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

OpenXRExtensionWrapper

La méthode _get_requested_extensions ajoute un nouveau paramètre xr_version

GH-109302

La méthode _set_instance_create_info_and_get_next_pointer ajoute un nouveau paramètre xr_version

N/A

N/A

N/A

GH-109302

Note

The OpenXRExtensionWrapper type is intended to be subclassed from GDExtensions. The method _set_instance_create_info_and_get_next_pointer has a void* parameter so it's not exposed to scripting.

Éditeur

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

EditorExportPreset

La méthode get_script_export_mode change de type de renvoi de int à EditorExportPreset.ScriptExportMode

✔️

GH-107167

EditorFileDialog

La méthode add_filter a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode add_option a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

Méthode add_side_menu supprimée

GH-111162

La méthode clear_filename_filter a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode clear_filters a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_filename_filter a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_line_edit a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_option_default a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_option_name a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_option_values a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_selected_options a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode get_vbox a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode invalidate a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode popup_file_dialog a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode set_filename_filter a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode set_option_default a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode set_option_name a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La méthode set_option_values a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La propriété access a été déplacée dans la classe parente FileDialog

✔️

✔️

GH-111212

La propriété current_dir a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La propriété current_file a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La propriété current_path a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La propriété display_mode a été déplacée dans la classe parente FileDialog

✔️

✔️

GH-111212

La propriété file_mode a été déplacée dans la classe parente FileDialog

✔️

✔️

GH-111212

La propriété filters a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

La propriété option_count a été déplacée dans la classe de base FileDialog

✔️

✔️

✔️

GH-111212

La propriété show_hidden_files a été déplacée dans la classe parente FileDialog

✔️

✔️

✔️

GH-111212

Le signal dir_selected a été déplacé dans la classe parente FileDialog

✔️

✔️

GH-111212

Le signal filename_filter_changed a été déplacé dans la classe parente FileDialog`

✔️

✔️

GH-111212

Le signal file_selected a été déplacé dans la classe parente FileDialog

✔️

✔️

GH-111212

Le signal files_selected a été déplacé dans la classe parente FileDialog

✔️

✔️

GH-111212

Changements de comportement

Android

Note

The source sets configuration for Android export templates has been updated to match the default Android Studio project structure (GH-110829). This affects the directory layout of the Android project:

  • Files previously in [Project root]/android/build/src/ are now in [Project root]/android/build/src/main/java/.

  • Android manifest file and assets directory have been moved to src/main/ subdirectories.

For example, GodotApp.java moved from src/com/godot/game/GodotApp.java to src/main/java/com/godot/game/GodotApp.java.

Core

Note

The Le Format de Fichier TSCN has changed in two ways in Godot 4.6:

  • load_steps is no longer written in scene files (GH-103352). This attribute wasn't used by the editor.

  • Unique node IDs are now saved to scene files to help track nodes when they are moved or renamed (GH-106837). This makes scene refactoring significantly more robust.

The changes are backwards-compatible and forwards-compatible, which means scenes saved in Godot 4.5 can still be loaded in Godot 4.6 and vice-versa (notwithstanding other incompatible changes performed in the scene itself).

As a result, when saving a scene that was last edited in Godot 4.5 in Godot 4.6, significant diffs will occur in version control programs. These diffs are expected.

As a reminder, you can upgrade all files in a project to the latest format using Project > Tools > Upgrade Project Files... in the editor, then committing the changes to version control. This allows you to avoid large diffs later on when editing scenes.

Rendu

Note

The default blend mode for Glow is now Screen, which looks more correct but is significantly brighter than the previous Soft Light mode (GH-110671).

Several other glow defaults were changed to ensure the glow didn't become too strong, but you will likely need to tweak glow properties in Environment after upgrading.

In addition, glow's Soft Light blend mode now always behaves as it did previously with use_hdr_2d, regardless of the Viewport's use_hdr_2d setting (GH-109971).

When using the Mobile renderer, the rewritten glow effect will look significantly different to the previous one for performance reasons (GH-110077). You may need to further adjust glow settings in Environment to achieve a similar look to before.

Note

Volumetric fog blending has been changed to be more physically accurate (GH-112494). This will cause volumetric fog to appear brighter in most scenes.

To compensate for this, you will need to decrease volumetric fog density or brightness in Environment, or decrease the Volumetric Fog Energy property on specific lights.

Valeurs par défaut modifiées

The following default values have been changed. If your project relies on the previous defaults, you may need to explicitly set them to the old values.

Note

The default rendering driver on Windows for newly created projects is now D3D12 (GH-113213). This can be changed in Project Settings under rendering/rendering_device/driver.windows.

Note

The default 3D physics engine for newly created projects is now Jolt Physics (GH-105737). This can be changed in Project Settings under physics/3d/physics_engine.

3D

Membre

Ancienne valeur

Nouvelle valeur

Intégré

MeshInstance3D

Propriété skeleton

NodePath("..")

NodePath("")

GH-112267

Note

The default value of skeleton has changed. Enable animation/compatibility/default_parent_skeleton_in_mesh_instance_3d in Project Settings if the old behavior is needed for compatibility.

Rendu

Membre

Ancienne valeur

Nouvelle valeur

Intégré

ProjectSettings

Property rendering/reflections/sky_reflections/roughness_layers

8

7

GH-107902

Property rendering/rendering_device/d3d12/agility_sdk_version

613

618

GH-114043

Environment

Propriété glow_blend_mode

2

1

GH-110671

Propriété glow_intensity

0.8

0.3

GH-110671

Propriété glow_levels/2

0.0

0.8

GH-110671

Propriété glow_levels/3

1.0

0.4

GH-110671

Propriété glow_levels/4

0.0

0.1

GH-110671

Propriété glow_levels/5

1.0

0.0

GH-110671

Property ssr_depth_tolerance

0.2

0.5

GH-111210

Nœuds GUI

Propriété/Paramètre

Ancienne valeur

Nouvelle valeur

Intégré

PopupMenu

Propriété submenu_popup_delay

0.3

0.2

GH-110256

ResourceImporterCSVTranslation

Propriété compress

true

1

GH-112073