Skip to content

Commit

Permalink
Update Y Sort and add String.right() in Upgrading to Godot 4 (#6464)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Locurcio <[email protected]>
  • Loading branch information
dalexeev and Calinou authored Dec 7, 2022
1 parent 0891d90 commit d6a4208
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tutorials/editor/upgrading_to_godot_4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ The most notable examples of this are:
GDScript. This allows for greater optimization, as StringName is specifically
designed to be used for "constant" strings that are created once and reused
many times. These types are not equivalent to each other, which means
``"example") == &"example"`` returns ``false`` (``&`` creates a StringName).
``"example" == &"example"`` returns ``false`` (``&`` creates a StringName).
This should be taken into account for ``if`` and ``match`` comparisons in
particular, as you may have to replace ``"example"`` with ``&"example"``.
- :ref:`GDScript setter and getter syntax <doc_gdscript_basics_setters_getters>`
Expand Down Expand Up @@ -534,6 +534,10 @@ The most notable examples of this are:
- A :ref:`class_StreamPeerTCP` must have ``poll()`` called on it to update its
state, instead of relying on ``get_status()`` automatically polling:
`GH-59582 <https://github.com/godotengine/godot/pull/59582>`__
- :ref:`class_String`'s ``right()`` method `has changed behavior <https://github.com/godotengine/godot/pull/36180>`__:
it now returns a number of characters from the right of the string, rather than
the right side of the string from a given position. If you need the old behavior,
you can use ``substr()`` instead.
- ``is_connected_to_host()`` was removed from StreamPeerTCP and PacketPeerUDP as
per `GH-59582 <https://github.com/godotengine/godot/pull/59582>`__.
``get_status()`` can be used in StreamPeerTCP instead.
Expand Down Expand Up @@ -573,7 +577,7 @@ converter doesn't support updating existing setups:
+---------------------+-----------------------+----------------------------------------------------------------------------+
| ToolButton | Button | ToolButton was Button with the **Flat** property enabled by default. |
+---------------------+-----------------------+----------------------------------------------------------------------------+
| YSort | Node2D | Node2D has a new **Y Sort** property in 4.0. |
| YSort | Node2D or Control | CanvasItem has a new **Y Sort Enabled** property in 4.0. |
+---------------------+-----------------------+----------------------------------------------------------------------------+
| ProximityGroup | Node3D | :ref:`class_VisibleOnScreenNotifier3D` can act as a replacement. |
+---------------------+-----------------------+----------------------------------------------------------------------------+
Expand Down

0 comments on commit d6a4208

Please sign in to comment.