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.
Checking the stable version of the documentation...
Migrar desde Godot 4.5 a Godot 4.6
For most games and apps made with 4.5 it should be relatively safe to migrate to 4.6. This page intends to cover everything you need to pay attention to when migrating your project.
Cambios importantes
If you are migrating from 4.5 to 4.6, the breaking changes listed here might affect you. Changes are grouped by areas/systems.
Este artículo indica si cada cambio significativo afecta a GDScript y si el cambio significativo en C# es compatible binario o compatible con el código fuente:
Binary compatible - Existing binaries will load and execute successfully without recompilation, and the run-time behavior won't change.
Compatible con el código fuente: el código fuente se compila correctamente sin ningún cambio al actualizar Godot.
Núcleo
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Acceso a archivos |
||||
Method |
✔️ |
|||
Method |
✔️ |
|||
Rendimiento: |
||||
Method |
✔️ |
Animación
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
AnimationPlayer |
||||
Property |
✔️ |
❌ |
❌ |
|
Property |
✔️ |
❌ |
❌ |
|
Property |
✔️ |
❌ |
❌ |
|
Method |
✔️ |
❌ |
❌ |
|
Signal |
✔️ |
❌ |
❌ |
3D
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
SpringBoneSimulator3D |
||||
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
Renderizado
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
DisplayServer |
||||
Method |
✔️ |
|||
Method |
✔️ |
Nodos GUI
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Control |
||||
Method |
✔️ |
|||
Method |
✔️ |
|||
FileDialog |
||||
Method |
✔️ |
|||
LineEdit |
||||
Method |
✔️ |
|||
SplitContainer |
||||
Method |
✔️ |
Redes
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
StreamPeerTCP |
||||
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
❌ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
TCPServer |
||||
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
OpenXR
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
OpenXRExtensionWrapper |
||||
Method |
❌ |
❌ |
❌ |
|
Method |
N/A |
N/A |
N/A |
Nota
El tipo OpenXRExtensionWrapper está destinado a ser subclasificado desde GDExtensions. El método _set_instance_create_info_and_get_next_pointer tiene un parámetro void*, por lo que no está expuesto al scripting.
Editor
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
EditorExportPreset |
||||
Method |
✔️ |
❌ |
❌ |
|
EditorFileDialog |
||||
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
||||
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Method |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
❌ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
❌ |
✔️ |
|
Property |
✔️ |
❌ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Property |
✔️ |
✔️ |
✔️ |
|
Signal |
✔️ |
❌ |
✔️ |
|
Signal |
✔️ |
❌ |
✔️ |
|
Signal |
✔️ |
❌ |
✔️ |
|
Signal |
✔️ |
❌ |
✔️ |
Cambios de comportamiento
Android
Nota
Los conjuntos de código fuente que configuran las plantillas de exportación para Android se han actualizado para ajustarse a la estructura de proyecto predeterminada de Android Studio (GH-110829). Esto afecta a la disposición de directorios del proyecto de Android:
Los archivos que anteriormente se encontraban en
[Project root]/android/build/src/ahora están en[Project root]/android/build/src/main/java/.El archivo de manifiesto de Android y el directorio de recursos se han movido a los subdirectorios
src/main/.
Por ejemplo, GodotApp.java se movió de src/com/godot/game/GodotApp.java a src/main/java/com/godot/game/GodotApp.java.
Núcleo
Nota
The Formato de archivo TSCN has changed in two ways in Godot 4.6:
load_stepsis 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 in the editor, then committing the changes to version control. This allows you to avoid large diffs later on when editing scenes.
Renderizado
Nota
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.
Nota
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.
Changed defaults
Se han cambiado los siguientes valores predeterminados. Si tu proyecto depende de los valores anteriores, puede que necesites establecerlos explícitamente a los valores antiguos.
Nota
El controlador de renderizado predeterminado en Windows para proyectos recién creados ahora es D3D12 (GH-113213). Esto puede cambiarse en Ajustes del Proyecto, en rendering/rendering_device/driver.windows.
Nota
El motor de física 3D predeterminado para proyectos recién creados ahora es Jolt Physics (GH-105737). Esto puede cambiarse en Ajustes del Proyecto, en physics/3d/physics_engine.
3D
Miembro |
Valor antiguo |
Nuevo valor |
Introducido |
|---|---|---|---|
MeshInstance3D |
|||
Property |
NodePath("..") |
NodePath("") |
Nota
El valor predeterminado de skeleton ha cambiado. Activa animation/compatibility/default_parent_skeleton_in_mesh_instance_3d en Ajustes del Proyecto si se necesita el comportamiento anterior por compatibilidad.
Renderizado
Miembro |
Valor antiguo |
Nuevo valor |
Introducido |
|---|---|---|---|
ProjectSettings |
|||
Propiedad |
8 |
7 |
|
Propiedad |
613 |
618 |
|
Entorno |
|||
Propiedad |
2 |
1 |
|
Propiedad |
0.8 |
0.3 |
|
Propiedad |
0.0 |
0.8 |
|
Propiedad |
1.0 |
0.4 |
|
Propiedad |
0.0 |
0.1 |
|
Propiedad |
1.0 |
0.0 |
|
Propiedad |
0.2 |
0.5 |
Nodos GUI
Propiedad/Parámetro |
Valor antiguo |
Nuevo valor |
Introducido |
|---|---|---|---|
PopupMenu |
|||
Property |
0.3 |
0.2 |
|
ResourceImporterCSVTranslation |
|||
Property |
true |
1 |