@@ -97,7 +97,7 @@ Automatically renamed nodes and resources
97
97
98
98
The list below refers to the nodes' new names in Godot 4.0. In the transition
99
99
between Godot 3.x and 4.0, dozens of nodes were renamed. 3D nodes had a ``3D ``
100
- prefix added to them for consistency with their 2D counterparts. This conversion
100
+ suffix added to them for consistency with their 2D counterparts. This conversion
101
101
is automatic.
102
102
103
103
For ease of searching, this table lists all nodes and resources that were
@@ -168,10 +168,6 @@ renamed in a way that does not involve only adding a ``3D`` suffix to the old na
168
168
+-----------------------------------------+-------------------------------------------+
169
169
| Physics2DTestMotionResult | PhysicsTestMotionResult2D |
170
170
+-----------------------------------------+-------------------------------------------+
171
- | PhysicsDirectBodyState | PhysicsDirectBodyState3D |
172
- +-----------------------------------------+-------------------------------------------+
173
- | PhysicsDirectSpaceState | PhysicsDirectSpaceState3D |
174
- +-----------------------------------------+-------------------------------------------+
175
171
| PlaneShape | WorldBoundaryShape3D |
176
172
+-----------------------------------------+-------------------------------------------+
177
173
| Position2D | Marker2D |
@@ -317,13 +313,17 @@ Due to how the project upgrade tool works, not all
317
313
- Camera2D's ``get_v_offset() `` is now ``get_drag_vertical_offset() ``.
318
314
- Camera2D's ``set_v_offset() `` is now ``set_drag_vertical_offset() ``.
319
315
- Camera2D's ``make_current() `` is now ``set_current() ``.
316
+ - CanvasItem's ``update() `` is now ``queue_redraw() ``.
320
317
- Control's ``set_tooltip() `` is now ``set_tooltip_text() ``.
321
318
- EditorNode3DGizmoPlugin's ``create_gizmo() `` is now ``_create_gizmo() ``
322
319
(note the leading underscore, which denotes a virtual method).
323
320
- ENetMultiplayerPeer's ``get_peer_port() `` is now ``get_peer() ``.
324
321
- FileDialog's ``get_mode() `` is now ``get_file_mode() ``.
325
322
- FileDialog's ``set_mode() `` is now ``set_file_mode() ``.
326
323
- GraphNode's ``get_offset() `` is now ``get_position_offset() ``.
324
+ - GridMap's ``world_to_map() `` is now ``local_to_map() ``.
325
+ - GridMap's ``map_to_world() `` is now ``map_to_local() ``.
326
+ - Image's ``get_rect() `` is now ``get_region() ``.
327
327
- ItemList's ``get_v_scroll() `` is now ``get_v_scroll_bar() ``.
328
328
- MultiPlayerAPI's ``get_network_connected_peers() `` is now ``get_peers() ``.
329
329
- MultiPlayerAPI's ``get_network_peer() `` is now ``get_peer() ``.
@@ -335,6 +335,8 @@ Due to how the project upgrade tool works, not all
335
335
- ResourceFormatLoader's ``get_dependencies() `` is now ``_get_dependencies() ``
336
336
(note the leading underscore, which denotes a virtual method).
337
337
- Shortcut's ``is_valid() `` is now ``has_valid_event() ``.
338
+ - TileMap's ``world_to_map() `` is now ``local_to_map() ``.
339
+ - TileMap's ``map_to_world() `` is now ``map_to_local() ``.
338
340
339
341
**Properties **
340
342
@@ -346,8 +348,10 @@ Due to how the project upgrade tool works, not all
346
348
``set_progress() `` and ``get_progress() `` respectively.
347
349
348
350
- Control's ``margin `` is now ``offset ``.
351
+ - Label's ``percent_visible `` is now ``visible_ratio ``.
349
352
- MultiPlayerAPI's ``refuse_new_network_connections `` is now ``refuse_new_connections ``.
350
353
- PathFollow2D and PathFollow3D's ``offset `` is now ``progress ``.
354
+ - TextureProgressBar's ``percent_visible `` is now ``show_percentage ``.
351
355
- The ``extents `` property on CSG nodes and VoxelGI will have to be replaced
352
356
with ``size ``, with the set value halved (as they're no longer half-extents).
353
357
This also affects its setter/getter methods ``set_extents() `` and
@@ -410,11 +414,23 @@ break backwards compatibility due to different default behavior.
410
414
The most notable examples of this are:
411
415
412
416
- Built-in scripts that are :ref: `tool scripts <doc_running_code_in_the_editor >`
413
- do not get the the ``tool `` keyword converted to the ``@tool `` annotation.
417
+ do not get the ``tool `` keyword converted to the ``@tool `` annotation.
414
418
- ``randomize() `` is now automatically called on project load, so deterministic
415
419
randomness with the global RandomNumberGenerate instance requires manually
416
420
setting a seed in a script's ``_ready() `` function.
417
- - ``OS.get_system_time_secs() `` should be converted to ``Time.get_time_dict_from_system()["second"] ``.
421
+ - AnimatedTexture's ``fps `` property was replaced by ``speed_scale ``, which
422
+ works the same as AnimationPlayer's ``playback_speed `` property.
423
+ - AnimatedSprite2D and AnimatedSprite3D now allow negative ``speed_scale ``
424
+ values. This may break animations if you relied on ``speed_scale `` being
425
+ internally clamped to ``0.0 ``.
426
+ - BaseButton's signals are now ``button_up `` and ``button_down ``. The
427
+ ``pressed `` property is now ``button_pressed ``.
428
+ - Camera2D's ``rotating `` property was replaced by ``ignore_rotation ``, which
429
+ has inverted behavior.
430
+ - Camera2D's ``zoom `` property was inverted: higher values are now more zoomed
431
+ in, instead of less.
432
+ - ``OS.get_system_time_secs() `` should be converted to
433
+ ``Time.get_time_dict_from_system()["second"] ``.
418
434
- A :ref: `class_StreamPeerTCP ` must have ``poll() `` called on it to update its
419
435
state, instead of relying on ``get_status() `` automatically polling:
420
436
`GH-59582 <https://github.com/godotengine/godot/pull/59582 >`__
@@ -429,50 +445,50 @@ This lists all nodes that were replaced by another node requiring different
429
445
configuration. The setup must be done from scratch again, as the project
430
446
converter doesn't support updating existing setups:
431
447
432
- +---------------------+-----------------------+----------------------------------------------------------------------+
433
- | Removed node | Closest approximation | Comment |
434
- +=====================+=======================+======================================================================+
435
- | AnimationTreePlayer | AnimationTree | AnimationTreePlayer was deprecated since Godot 3.1. |
436
- +---------------------+-----------------------+----------------------------------------------------------------------+
437
- | BakedLightmap | LightmapGI | See :ref: `doc_baked_lightmaps `. |
438
- +---------------------+-----------------------+ |
439
- | BakedLightmapData | LightmapGIData | |
440
- +---------------------+-----------------------+----------------------------------------------------------------------+
441
- | BitmapFont | FontFile | See :ref: `doc_gui_using_fonts `. |
442
- +---------------------+-----------------------+ |
443
- | DynamicFont | FontFile | |
444
- +---------------------+-----------------------+ |
445
- | DynamicFontData | FontFile | |
446
- +---------------------+-----------------------+----------------------------------------------------------------------+
447
- | Navigation3D | Node3D | Replaced by other Navigation nodes. |
448
- +---------------------+-----------------------+----------------------------------------------------------------------+
449
- | Navigation2D | Node2D | Replaced by other Navigation nodes. |
450
- +---------------------+-----------------------+----------------------------------------------------------------------+
451
- | OpenSimplexNoise | FastNoiseLite | Has different parameters and more noise types such as cellular. No |
452
- | | | support for 4D noise as it's absent from the FastNoiseLite library. |
453
- +---------------------+-----------------------+----------------------------------------------------------------------+
454
- | ToolButton | Button | ToolButton was Button with the **Flat ** property enabled by default. |
455
- +---------------------+-----------------------+----------------------------------------------------------------------+
456
- | YSort | Node2D | Node2D has a new **Y Sort ** property in 4.0. |
457
- +---------------------+-----------------------+----------------------------------------------------------------------+
458
- | ProximityGroup | Node3D | :ref: `class_VisibleOnScreenNotifier3D ` can act as a replacement. |
459
- +---------------------+-----------------------+----------------------------------------------------------------------+
460
- | Portal | Node3D | Portal and room occlusion culling was replaced by raster |
461
- | | | :ref: `occlusion culling <doc_occlusion_culling >` |
462
- | | | (OccluderInstance3D node), which requires a different setup process. |
463
- +---------------------+-----------------------+ |
464
- | Room | Node3D | |
465
- +---------------------+-----------------------+ |
466
- | RoomManager | Node3D | |
467
- +---------------------+-----------------------+ |
468
- | RoomGroup | Node3D | |
469
- +---------------------+-----------------------+----------------------------------------------------------------------+
470
- | Occluder | Node3D | Geometry occlusion culling was replaced by raster |
471
- | | | :ref: `occlusion culling <doc_occlusion_culling >` |
472
- | | | (OccluderInstance3D node), which requires a different setup process. |
473
- +---------------------+-----------------------+ |
474
- | OccluderShapeSphere | Resource | |
475
- +---------------------+-----------------------+----------------------------------------------------------------------+
448
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
449
+ | Removed node | Closest approximation | Comment |
450
+ +=====================+=======================+============================================================================ +
451
+ | AnimationTreePlayer | AnimationTree | AnimationTreePlayer was deprecated since Godot 3.1. |
452
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
453
+ | BakedLightmap | LightmapGI | See :ref: `doc_baked_lightmaps `. |
454
+ +---------------------+-----------------------+ |
455
+ | BakedLightmapData | LightmapGIData | |
456
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
457
+ | BitmapFont | FontFile | See :ref: `doc_gui_using_fonts `. |
458
+ +---------------------+-----------------------+ |
459
+ | DynamicFont | FontFile | |
460
+ +---------------------+-----------------------+ |
461
+ | DynamicFontData | FontFile | |
462
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
463
+ | Navigation2D | Node2D | Replaced by :ref: ` other 2D Navigation nodes < navigation_introduction_2d >`. |
464
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
465
+ | Navigation3D | Node3D | Replaced by :ref: ` other 3D Navigation nodes < navigation_introduction_3d >`. |
466
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
467
+ | OpenSimplexNoise | FastNoiseLite | Has different parameters and more noise types such as cellular. No |
468
+ | | | support for 4D noise as it's absent from the FastNoiseLite library. |
469
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
470
+ | ToolButton | Button | ToolButton was Button with the **Flat ** property enabled by default. |
471
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
472
+ | YSort | Node2D | Node2D has a new **Y Sort ** property in 4.0. |
473
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
474
+ | ProximityGroup | Node3D | :ref: `class_VisibleOnScreenNotifier3D ` can act as a replacement. |
475
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
476
+ | Portal | Node3D | Portal and room occlusion culling was replaced by raster |
477
+ | | | :ref: `occlusion culling <doc_occlusion_culling >` |
478
+ | | | (OccluderInstance3D node), which requires a different setup process. |
479
+ +---------------------+-----------------------+ |
480
+ | Room | Node3D | |
481
+ +---------------------+-----------------------+ |
482
+ | RoomManager | Node3D | |
483
+ +---------------------+-----------------------+ |
484
+ | RoomGroup | Node3D | |
485
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
486
+ | Occluder | Node3D | Geometry occlusion culling was replaced by raster |
487
+ | | | :ref: `occlusion culling <doc_occlusion_culling >` |
488
+ | | | (OccluderInstance3D node), which requires a different setup process. |
489
+ +---------------------+-----------------------+ |
490
+ | OccluderShapeSphere | Resource | |
491
+ +---------------------+-----------------------+---------------------------------------------------------------------------- +
476
492
477
493
If loading an old project, the node will be replaced with its
478
494
*Closest approximation * automatically (even if not using the project upgrade tool).
0 commit comments