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.4 vers Godot 4.5

Pour la plupart des jeux et applications fabriqués en 4.4, il devrait être relativement sûr de migrer en 4.5. 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.4 à la 4.5, les changements cassants énumérés ici pourraient vous affecter. Les changements sont regroupés par zones/systèmes.

Avertissement

In order to support new Google Play requirements Android now requires targeting .NET 9 when exporting C# projects to Android, other platforms continue to use .NET 8 as the minimum required version but newer versions are supported and encouraged.

Si vous utilisez C# dans votre projet et que vous souhaitez l'exporter sur Android, vous aurez besoin de mettre à jour votre projet vers .NET 9 (cf Upgrading to a new .NET version for instructions).

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é

JSONRPC

Méthode set_scope remplacée par set_method

GH-104890

Nœuds :

Méthode get_rpc_config renommée en get_node_rpc_config

✔️

✔️

GH-106848

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

✔️

✔️

✔️

GH-76560

Rendu

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

DisplayServer

La méthode file_dialog_show ajoute un nouveau paramètre optionnel parent_window_id

✔️

✔️

✔️

GH-98194

La méthode file_dialog_with_options_show ajoute un nouveau paramètre optionnel parent_window_id

✔️

✔️

✔️

GH-98194

RenderingDevice

La méthode texture_create_from_extension ajoute un nouveau paramètre optionnel mipmaps

✔️

✔️

✔️

GH-105570

RenderingServer

Méthode instance_reset_physics_interpolation enlevée

✔️

✔️

GH-104269

Méthode instance_set_interpolated supprimée

✔️

✔️

GH-104269

Note

Dans C#, l'énumération RenderingDevice.Features casse la compatibilité en raison de la façon dont le générateur de liaisons détecte le préfixe enum. De nouveaux membres ont été ajoutés dans GH-103941 à l’énumération, ce qui a forcé les membres de l'énumération Address à être renommés BufferDeviceAddress.

GLTF

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

GLTFAccessor

La propriété byte_offset change de type de métadonnées, de int32 à int64

✔️

GH-106220

La propriété component_type change de type, de int à GLTFAccessor::GLTFComponentType

✔️

GH-106220

La propriété count change de type de métadonnées, de int32 à int64

✔️

GH-106220

La propriété sparse_count change de type de métadonnées, de int32 à int64

✔️

GH-106220

La propriété sparse_indices_byte_offset change de type de métadonnées, de int32 à int64

✔️

GH-106220

La propriété sparse_indices_component_type change de type, de int à GLTFAccessor::GLTFComponentType

✔️

GH-106220

La propriété sparse_values_byte_offset change de type de métadonnées, de int32 à intint64

✔️

GH-106220

GLTFBufferView

La propriété byte_length change de type de métadonnées, de int32at à int64

✔️

GH-106220

La propriété byte_offset change de type de métadonnées, de int32 à int64

✔️

GH-106220

La propriété byte_stride change de type de métadonnées, de int32 à int64

✔️

GH-106220

Note

As a result of changing the type metadata, the C# bindings changed the type from int (32-bytes) to long (64-bytes).

Texte

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

CanvasItem

La méthode draw_char ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_char_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_multiline_string ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_multiline_string_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_string ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_string_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

Font

La méthode draw_char ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_char_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_multiline_string ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_multiline_string_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_string ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_string_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

RichTextLabel

La méthode add_image ajoute un nouveau paramètre optionnel alt_text

✔️

✔️

✔️

GH-76829

Method add_image replaced size_in_percent parameter by width_in_percent and height_in_percent

✔️

✔️

✔️

GH-107347

La méthode push_strikethrough ajoute un nouveau paramètre optionnel color

✔️

✔️

✔️

GH-106300

La méthode push_table ajoute un nouveau paramètre optionnel name

✔️

✔️

✔️

GH-76829

La méthode push_underline ajoute un nouveau paramètre optionnel color

✔️

✔️

✔️

GH-106300

Method update_image replaced size_in_percent parameter by width_in_percent and height_in_percent

✔️

✔️

✔️

GH-107347

TextLine

La méthode draw ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

TextParagraph

La méthode draw ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_dropcap ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_dropcap_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_line ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_line_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode draw_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

TextServer

La méthode font_draw_glyph ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode font_draw_glyph_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode shaped_text_draw ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

La méthode shaped_text_draw_outline ajoute un nouveau paramètre optionnel oversampling

✔️

✔️

✔️

GH-104872

TreeItem

La méthode add_button ajoute un nouveau paramètre optionnel alt_text

✔️

✔️

✔️

GH-76829

TextServerExtension

La méthode _font_draw_glyph ajoute un nouveau paramètre optionnel oversampling

GH-104872

La méthode _font_draw_glyph_outline ajoute un nouveau paramètre optionnel oversampling

GH-104872

La méthode _shaped_text_draw ajoute un nouveau paramètre optionnel oversampling

GH-104872

La méthode _shaped_text_draw_outline ajoute un nouveau paramètre optionnel oversampling

GH-104872

XR

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

OpenXRAPIExtension

La méthode register_composition_layer_provider change le type du paramètre extension de OpenXRExtensionWrapperExtension en OpenXRExtensionWrapper

✔️

✔️

✔️

GH-104087

La méthode register_projection_views_extension change le type du paramètre extension de OpenXRExtensionWrapperExtension en OpenXRExtensionWrapper

✔️

✔️

✔️

GH-104087

La méthode unregister_composition_layer_provider change le type du paramètre extension de OpenXRExtensionWrapperExtension en OpenXRExtensionWrapper

✔️

✔️

✔️

GH-104087

La méthode unregister_projection_views_extension change le type du paramètre extension de OpenXRExtensionWrapperExtension en OpenXRExtensionWrapper

✔️

✔️

✔️

GH-104087

OpenXRBindingModifierEditor

Le type OpenXRBindingModifierEditor a changé de type d'API de Core à Editor

GH-103869

OpenXRInteractionProfileEditor

Le type OpenXRInteractionProfileEditor a changé de type d'API de Core à Editor

GH-103869

OpenXRInteractionProfileEditorBase

Le type OpenXRInteractionProfileEditorBase a changé de type d'API de Core à Editor

GH-103869

Note

Les classes OpenXRBindingModifierEditor, OpenXRInteractionProfileEditor, et OpenXRInteraction ProfileEditorBase sont seulement disponibles dans l'éditeur. Les utiliser à l'extérieur de l'éditeur entraînera une erreur de compilation.

In C#, this means the types are moved from the GodotSharp assembly to the GodotSharpEditor assembly. Make sure to wrap code that uses these types in a #if TOOLS block to ensure they are not included in an exported game.

This change was also backported to 4.4.1.

Extensions pour l'éditeur

Modifications

Compatible GDScript

Compatible binaire C#

Compatible source C#

Intégré

EditorExportPlatform

La méthode get_forced_export_files ajoute un nouveau paramètre optionnel preset

✔️

✔️

✔️

GH-71542

EditorUndoRedoManager

La méthode create_action ajoute un nouveau paramètre optionnel mark_unsaved

✔️

✔️

✔️

GH-106121

EditorExportPlatformExtension

La méthode _get_option_icon change de type de retour de ImageTexture en Texture2D

✔️

GH-108825

Changements de comportement

En 4.5, certains changements de comportement ont été introduits, ce qui pourrait vous obliger à ajuster votre projet.

TileMapLayer

TileMapLayer.get_coords_for_body_rid() will return different values in 4.5 compared to 4.4, as TileMapLayer physics chunking is enabled by default. Higher values of TileMapLayer.physics_quadrant_size will make this function less precise. To get the exact cell coordinates like in 4.4 and prior versions, you need to set TileMapLayer.physics_quadrant_size to 1, which disables physics chunking.

3D Model Import

A fix has been made to the 3D model importers to correctly handle non-joint nodes within a skeleton hierarchy (GH-104184). To preserve compatibility, the default behavior is to import existing files with the same behavior as before (GH-107352). New .gltf, .glb, .blend, and .fbx files (without a corresponding .import file) will be imported with the new behavior. However, for existing files, if you want to use the new behavior, you must change the "Naming Version" option at the bottom of the Import dock:

../../_images/gltf_naming_version.webp

Core

Note

Resource.duplicate(true) (which performs deep duplication) now only duplicates resources internal to the resource file it's called on. In 4.4, this duplicated everything instead, including external resources. If you were deep-duplicating a resource that contained references to other external resources, those external resources aren't duplicated anymore. You must call Resource.duplicate_deep(DEEP_DUPLICATE_ALL) instead to keep the old behavior.

Note

ProjectSettings.add_property_info() now prints a warning when the dictionary parameter has missing keys or invalid keys. Most importantly, it will now warn when a usage key is passed, as this key is not used. This was also the case before 4.5, but it was silently ignored instead. As a reminder, to set property usage information correctly, you must use ProjectSettings.set_as_basic(), ProjectSettings.set_restart_if_changed(), or ProjectSettings.set_as_internal() instead.

Note

In C#, StringExtensions.PathJoin now avoids adding an extra path separator when the original string is empty, or when the appended path starts with a path separator (GH-105281).

Note

In C#, StringExtensions.GetExtension now returns an empty string instead of the original string when the original string does not contain an extension (GH-108041).

Note

En C#, le constructeur Quaternion(Vector3, Vector3) crée maintenant correctement un quaternion représentant le plus court arc entre les deux vecteurs d'entrée. Auparavant, il renvoyait des valeurs incorrectes pour certaines entrées (GH-107618).

Physique

Note

When the 3D physics engine is set to Jolt Physics, you will now always have overlaps between Area3D and static bodies reported by default, as the physics/jolt_physics_3d/simulation/areas_detect_static_bodies project setting has been removed (GH-105746). If you still want such overlaps to be ignored, you will need to change the collision mask or layer of either the Area3D or the static body instead.

Texte

Note

In GDScript, calls to functions RichTextLabel::add_image and RichTextLabel::update_image will continue to work, but the size_in_percent argument will now be used as the value for width_in_percent and height_in_percent will default to false (GH-107347). To restore the previous behavior, you can explicitly set height_in_percent to the same value you were passing as size_in_percent.