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.

Upgrading from Godot 4.6 to Godot 4.7

For most games and apps made with 4.6 it should be relatively safe to migrate to 4.7. This page intends to cover everything you need to pay attention to when migrating your project.

Cambios importantes

If you are migrating from 4.6 to 4.7, 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 runtime 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

Object

Method is_class changes class parameter type from String to StringName

✔️

|✔️ compatible|

✔️

GH-118582

ZIPPacker

Method start_file adds new permissions and modified_time optional parameters

✔️

|✔️ compatible|

✔️

GH-115946

OptimizedTranslation

Method generate changes return type from void to bool

✔️

❌

✔️

GH-119563

2D

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

CPUParticles2D

Method request_particles_process adds new process_time_residual optional parameter

✔️

|✔️ compatible|

✔️

GH-109142

GPUParticles2D

Method request_particles_process adds new process_time_residual optional parameter

✔️

|✔️ compatible|

✔️

GH-109142

3D

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

CPUParticles3D

Method request_particles_process adds new process_time_residual optional parameter

✔️

|✔️ compatible|

✔️

GH-109142

GPUParticles3D

Method request_particles_process adds new process_time_residual optional parameter

✔️

|✔️ compatible|

✔️

GH-109142

Nodos GUI

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

Control

Property accessibility_live changes type from DisplayServer.AccessibilityLiveMode to AccessibilityServer.AccessibilityLiveMode

✔️

❌

❌

GH-116839

RichTextLabel

Enum field ImageUpdateMask.UPDATE_WIDTH_IN_PERCENT renamed to ImageUpdateMask.UPDATE_WIDTH_UNIT

❌

✔️

❌

GH-112617

Method add_image changes width parameter type from int to float

✔️

|✔️ compatible|

✔️

GH-112617

Method add_image changes height parameter type from int to float

✔️

|✔️ compatible|

✔️

GH-112617

Method add_image renames width_in_percent parameter to width_unit and changes type from bool to RichTextLabel.ImageUnit

✔️

|✔️ compatible|

❌

GH-112617

Method add_image renames height_in_percent parameter to height_unit and changes type from bool to RichTextLabel.ImageUnit

✔️

|✔️ compatible|

❌

GH-112617

Method update_image changes width parameter type from int to float

✔️

|✔️ compatible|

✔️

GH-112617

Method update_image changes height parameter type from int to float

✔️

|✔️ compatible|

✔️

GH-112617

Method update_image renames width_in_percent parameter to width_unit and changes type from bool to RichTextLabel.ImageUnit

✔️

|✔️ compatible|

❌

GH-112617

Method update_image renames height_in_percent parameter to height_unit and changes type from bool to RichTextLabel.ImageUnit

✔️

|✔️ compatible|

❌

GH-112617

Text

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

Fuente

Method find_variation adds new palette_index and custom_colors optional parameters

✔️

|✔️ compatible|

✔️

GH-117149

TreeItem

Method select adds new set_as_cursor optional parameter

✔️

|✔️ compatible|

✔️

GH-119367

Renderizado

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

Image

Method save_exr adds new color_image and max_linear_value optional parameters

✔️

|✔️ compatible|

✔️

GH-117800

Method save_exr_to_buffer adds new color_image and max_linear_value optional parameters

✔️

|✔️ compatible|

✔️

GH-117800

ImageTexture

Method get_format moved to base class Texture2D

✔️

✔️

✔️

GH-109004

PortableCompressedTexture2D

Method get_format moved to base class Texture2D

✔️

✔️

✔️

GH-109004

RenderingServer

El método particles_request_process_time renombra el parámetro time a process_time y añade un nuevo parámetro opcional process_time_residual

✔️

|✔️ compatible|

❌

GH-109142

Method viewport_set_size adds new view_count optional parameter

✔️

|✔️ compatible|

✔️

GH-115799

Animación

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

Animación

Property length changes type metadata from float to double

✔️

❌

❌

GH-116394

AnimationNodeBlendSpace1D

Method add_blend_point adds new name optional parameter

✔️

|✔️ compatible|

✔️

GH-110369

AnimationNodeBlendSpace2D

Method add_blend_point adds new name optional parameter

✔️

|✔️ compatible|

✔️

GH-110369

Física

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

PhysicsServer2D

Method body_set_shape_as_one_way_collision adds new direction optional parameter

✔️

|✔️ compatible|

✔️

GH-104736

PhysicsServer2DExtension

Method _body_set_shape_as_one_way_collision adds new direction parameter

❌

❌

❌

GH-104736

Audio

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

AudioEffectSpectrumAnalyzer

Property tap_back_pos removed

❌

❌

❌

GH-114355

XR

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

OpenXRExtensionWrapper

Method _on_register_metadata adds new interaction_profile_metadata parameter

❌

❌

❌

GH-117399

OpenXRSpatialAnchorCapability

Method create_new_anchor adds new next optional parameter

✔️

|✔️ compatible|

✔️

GH-118128

Editor

Cambio

Compatibilidad con GDScript

Compatible con binarios C#

Compatible con código fuente C#

Introducido

EditorSceneFormatImporter

La constante IMPORT_ANIMATION se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_DISCARD_MESHES_AND_MATERIALS se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_FAIL_ON_MISSING_DEPENDENCIES se movió al enumerado ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_FORCE_DISABLE_MESH_COMPRESSION se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_GENERATE_TANGENT_ARRAYS se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_SCENE se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

La constante IMPORT_USE_NAMED_SKIN_BINDS se movió al enum ImportFlags

✔️

✔️

❌

GH-115788

EditorVCSInterface

Method _commit adds new amend parameter

❌

❌

❌

GH-117968

Cambios de comportamiento

Animación

Nota

AnimationNodeBlendSpace1D and AnimationNodeBlendSpace2D have a new SyncMode enum that replaces the previous boolean sync property. If you are using an AnimationTree and your animations aren't transitioning correctly after upgrading, you may need to set that value in each of your blend spaces to get the desired behavior back.

Los nuevos modos de sincronización están documentados en AnimationNodeBlendSpace1D.sync_mode y AnimationNodeBlendSpace2D.sync_mode.

Renderizado

Nota

El shader visual LinearToSRGB ya no se limita al rango [0.0, 1.0] cuando se utiliza el renderizador Mobile o Forward+ (GH-113956).

Nota

CanvasItem ahora evita añadir el difuminado de antialiasing al dibujar líneas (GH-105122). El difuminado hacía que las líneas parecieran más gruesas de lo previsto; los proyectos que dependían de este comportamiento deberán actualizarse para dibujar líneas con un grosor mayor.

Física

Nota

El valor predeterminado de area_mask para AudioStreamPlayer se cambió de 1 a 0 (deshabilitado) (GH-107679). Si usas la feature audio_bus_override en Area2D o Area3D, y utilizas el valor predeterminado de area_mask de AudioStreamPlayer (solo la capa 1 marcada), necesitarás restablecer la máscara a la capa 1 — de lo contrario, las anulaciones del bus dejarán de funcionar. Si la máscara estaba configurada en cualquier valor distinto de la capa 1, seguirá funcionando como se espera.

Nota

When using Jolt Physics as the 3D physics engine, WorldBoundaryShape3D will now use the same convention as Godot when applying WorldBoundaryShape3D.plane.d, resulting in the sign of the plane distance being interpreted in the opposite way compared to Godot 4.6 (GH-118948). You will need to flip the sign yourself to get the same behavior as in Godot 4.6.

Nota

Al usar Jolt Physics como motor de físicas 3D, SoftBody3D ya no tendrá por defecto una masa de 0, lo que resultaba en un peso calculado automáticamente de 1 kg por punto y, por ende, una masa total muy alta para el cuerpo. Ahora, en su lugar, tendrá por defecto 1 kg para todo el SoftBody3D, igual que en Godot Physics (GH-116041).

Nota

Al usar Jolt Physics como motor de físicas 3D, SoftBody3D ahora aplica SoftBody3D.linear_stiffness de una manera que se ajusta mejor a Godot Physics y que en general resulta más apropiada (GH-116041). Esto afectará a todas las instancias de SoftBody3D de una forma u otra, lo que significa que necesitarás volver a ajustar propiedades como SoftBody3D.linear_stiffness y SoftBody3D.damping_coefficient para lograr el comportamiento deseado.

Nota

Al usar Jolt Physics como motor de físicas 3D, Area3D ahora reportará solapamientos con SoftBody3D a través de sus distintas señales y métodos (GH-114198). Para evitar problemas con este cambio disruptivo, configura tus capas/máscaras de colisión de manera que cualquier interacción no deseada entre Area3D y SoftBody3D sea ignorada.

Entrada

Nota

The device IDs for mouse and keyboard were changed from 0 to InputEvent.DEVICE_ID_MOUSE and InputEvent.DEVICE_ID_KEYBOARD because some joypads may use 0 as their ID (GH-116274). Check the input event by type or compare the device ID InputEvent.device to the constants InputEvent.DEVICE_ID_MOUSE and InputEvent.DEVICE_ID_KEYBOARD instead.

GDScript

Nota

Setting the element of packed arrays no longer calls the setter for the entire packed array property (GH-113228).

Nota

Los métodos que heredan de otro con un retorno tipado ahora también heredan ese tipo de retorno, lo que exige una instrucción explícita de return en la sobrescritura (GH-115763). Para corregir el error, añade return null al final del método.

Plataformas

Nota

La versión mínima de macOS requerida para ejecutar Godot se incrementó de macOS 10.13 (High Sierra) a macOS 11 (Big Sur).

Changed defaults

The following default values have been changed. If your project uses any of these properties with their default value, you can achieve a similar behavior to the previous version by manually setting the values to match the old defaults.

Nota

The default stretch mode and stretch aspect for newly created projects is now canvas_items and expand respectively (previously disabled and keep). This can be changed in the Project Settings under display/window/stretch/mode and display/window/stretch/aspect.

Animación

Propiedad/Parámetro

Old Default

New Default

LookAtModifier3D

Property relative

true

false

Núcleo

Propiedad/Parámetro

Old Default

New Default

ProjectSettings

Propiedad rendering/reflections/sky_reflections/roughness_layers

7

8

Nodos GUI

Propiedad/Parámetro

Old Default

New Default

RichTextLabel

Method add_image parameter width_in_percent

false

0

Method add_image parameter height_in_percent

false

0

Method update_image parameter width_in_percent

false

0

Method update_image parameter height_in_percent

false

0

Importar

Propiedad/Parámetro

Old Default

New Default

ResourceImporterDynamicFont

Property hinting

1

3