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...
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 |
✔️ |
✔️ |
||
ZIPPacker |
||||
Method |
✔️ |
✔️ |
||
OptimizedTranslation |
||||
Method |
✔️ |
❌ |
✔️ |
2D
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
CPUParticles2D |
||||
Method |
✔️ |
✔️ |
||
GPUParticles2D |
||||
Method |
✔️ |
✔️ |
3D
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
CPUParticles3D |
||||
Method |
✔️ |
✔️ |
||
GPUParticles3D |
||||
Method |
✔️ |
✔️ |
Nodos GUI
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Control |
||||
Property |
✔️ |
❌ |
❌ |
|
RichTextLabel |
||||
Enum field |
❌ |
✔️ |
❌ |
|
Method |
✔️ |
✔️ |
||
Method |
✔️ |
✔️ |
||
Method |
✔️ |
❌ |
||
Method |
✔️ |
❌ |
||
Method |
✔️ |
✔️ |
||
Method |
✔️ |
✔️ |
||
Method |
✔️ |
❌ |
||
Method |
✔️ |
❌ |
Text
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Fuente |
||||
Method |
✔️ |
✔️ |
||
TreeItem |
||||
Method |
✔️ |
✔️ |
Renderizado
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Image |
||||
Method |
✔️ |
✔️ |
||
Method |
✔️ |
✔️ |
||
ImageTexture |
||||
Method |
✔️ |
✔️ |
✔️ |
|
PortableCompressedTexture2D |
||||
Method |
✔️ |
✔️ |
✔️ |
|
RenderingServer |
||||
El método |
✔️ |
❌ |
||
Method |
✔️ |
✔️ |
Animación
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
Animación |
||||
Property |
✔️ |
❌ |
❌ |
|
AnimationNodeBlendSpace1D |
||||
Method |
✔️ |
✔️ |
||
AnimationNodeBlendSpace2D |
||||
Method |
✔️ |
✔️ |
Física
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
PhysicsServer2D |
||||
Method |
✔️ |
✔️ |
||
PhysicsServer2DExtension |
||||
Method |
❌ |
❌ |
❌ |
Audio
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
AudioEffectSpectrumAnalyzer |
||||
Property |
❌ |
❌ |
❌ |
XR
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
OpenXRExtensionWrapper |
||||
Method |
❌ |
❌ |
❌ |
|
OpenXRSpatialAnchorCapability |
||||
Method |
✔️ |
✔️ |
Editor
Cambio |
Compatibilidad con GDScript |
Compatible con binarios C# |
Compatible con código fuente C# |
Introducido |
|---|---|---|---|---|
EditorSceneFormatImporter |
||||
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
La constante |
✔️ |
✔️ |
❌ |
|
EditorVCSInterface |
||||
Method |
❌ |
❌ |
❌ |
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 |
true |
false |
Núcleo
Propiedad/Parámetro |
Old Default |
New Default |
|---|---|---|
ProjectSettings |
||
Propiedad |
7 |
8 |
Nodos GUI
Propiedad/Parámetro |
Old Default |
New Default |
|---|---|---|
RichTextLabel |
||
Method |
false |
0 |
Method |
false |
0 |
Method |
false |
0 |
Method |
false |
0 |
Importar
Propiedad/Parámetro |
Old Default |
New Default |
|---|---|---|
ResourceImporterDynamicFont |
||
Property |
1 |
3 |