upgrading_to_godot_4.4.rst 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. .. _doc_upgrading_to_godot_4.4:
  2. Upgrading from Godot 4.3 to Godot 4.4
  3. =====================================
  4. For most games and apps made with 4.3 it should be relatively safe to migrate to 4.4.
  5. This page intends to cover everything you need to pay attention to when migrating
  6. your project.
  7. Breaking changes
  8. ----------------
  9. If you are migrating from 4.3 to 4.4, the breaking changes listed here might
  10. affect you. Changes are grouped by areas/systems.
  11. This article indicates whether each breaking change affects GDScript and whether
  12. the C# breaking change is *binary compatible* or *source compatible*:
  13. - **Binary compatible** - Existing binaries will load and execute successfully without
  14. recompilation, and the run-time behavior won't change.
  15. - **Source compatible** - Source code will compile successfully without changes when
  16. upgrading Godot.
  17. Core
  18. ~~~~
  19. ======================================================================================================================== =================== ==================== ==================== ============
  20. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  21. ======================================================================================================================== =================== ==================== ==================== ============
  22. **FileAccess**
  23. Method ``open_encrypted`` adds a new ``iv`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-98918`_
  24. Method ``store_8`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  25. Method ``store_16`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  26. Method ``store_32`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  27. Method ``store_64`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  28. Method ``store_buffer`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  29. Method ``store_csv_line`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  30. Method ``store_double`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  31. Method ``store_float`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  32. Method ``store_half`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  33. Method ``store_line`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  34. Method ``store_pascal_string`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  35. Method ``store_real`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  36. Method ``store_string`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  37. Method ``store_var`` changes return type from ``void`` to ``bool`` |✔️| |❌| |✔️| `GH-78289`_
  38. **OS**
  39. Method ``execute_with_pipe`` adds a new ``blocking`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94434`_
  40. Method ``read_string_from_stdin`` adds a new ``buffer_size`` parameter [#f1]_ |❌| |✔️ with compat| |✔️ with compat| `GH-91201`_
  41. **RegEx**
  42. Method ``compile`` adds a new ``show_error`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-95212`_
  43. Method ``create_from_string`` adds a new ``show_error`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-95212`_
  44. **Semaphore**
  45. Method ``post`` adds a new ``count`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-93605`_
  46. **TranslationServer**
  47. Method ``standardize_locale`` adds a new ``add_defaults`` optional parameter
  48. |✔️| |✔️ with compat| |✔️ with compat| `GH-98972`_
  49. ======================================================================================================================== =================== ==================== ==================== ============
  50. **Export annotations**
  51. .. warning::
  52. The behavior of ``@export_file`` changed in Godot 4.4. When assigning a new value from the Inspector, the path is now stored and returned as a ``uid://`` reference instead of the traditional ``res://`` path. This is a **breaking change** and may cause issues if you're expecting ``res://``-based paths in scripts or serialized files.
  53. For example, exported arrays of files may now contain a mix of ``uid://`` and ``res://`` paths, especially if they were edited partially in the Inspector.
  54. In 4.4, the only way to retain the ``res://`` format is to **manually edit** the `.tscn` or `.tres` files in a text editor. Starting in Godot 4.5, a new annotation ``@export_file_path`` can be used to explicitly retain the old behavior and export raw ``res://`` paths.
  55. Related issues:
  56. - PR: `Add @export_file_path to export raw paths (no UID) <https://github.com/godotengine/godot/pull/105414>`_
  57. - Issue: `@export_file behavior change is breaking <https://github.com/godotengine/godot/issues/11065>`_
  58. - See also: `ProjectSettings stores UIDs for file paths <https://github.com/godotengine/godot/pull/104818>`_
  59. .. [#f1] Default buffer size in 4.3 is ``1024``.
  60. GUI nodes
  61. ~~~~~~~~~
  62. ======================================================================================================================== =================== ==================== ==================== ============
  63. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  64. ======================================================================================================================== =================== ==================== ==================== ============
  65. **RichTextLabel**
  66. Method ``push_meta`` adds a new ``tooltip`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-99481`_
  67. Method ``set_table_column_expand`` adds a new ``shrink`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-101482`_
  68. **GraphEdit**
  69. Method ``connect_node`` adds a new ``keep_alive`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-97449`_
  70. Signal ``frame_rect_changed`` changes ``new_rect`` parameter type from ``Vector2`` to ``Rect2`` |❌| |❌| |❌| `GH-102796`_
  71. ======================================================================================================================== =================== ==================== ==================== ============
  72. Physics
  73. ~~~~~~~
  74. ======================================================================================================================== =================== ==================== ==================== ============
  75. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  76. ======================================================================================================================== =================== ==================== ==================== ============
  77. **SoftBody3D**
  78. Method ``set_point_pinned`` adds a new ``insert_at`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94684`_
  79. ======================================================================================================================== =================== ==================== ==================== ============
  80. Rendering
  81. ~~~~~~~~~
  82. ======================================================================================================================== =================== ==================== ==================== ============
  83. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  84. ======================================================================================================================== =================== ==================== ==================== ============
  85. **CPUParticles2D**
  86. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  87. **CPUParticles3D**
  88. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  89. **GPUParticles2D**
  90. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  91. **GPUParticles3D**
  92. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  93. **RenderingDevice**
  94. Method ``draw_list_begin`` adds a new ``breadcrumb`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-90993`_
  95. Method ``draw_list_begin`` removes many parameters |❌| |✔️ with compat| |✔️ with compat| `GH-98670`_
  96. Method ``index_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  97. Method ``uniform_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  98. Method ``vertex_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  99. **RenderingServer**
  100. Method ``multimesh_allocate_data`` adds a new ``use_indirect`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-99455`_
  101. **Shader**
  102. Method ``get_default_texture_parameter`` changes return type from ``Texture2D`` to ``Texture`` |✔️| |❌| |❌| `GH-95126`_
  103. Method ``set_default_texture_parameter`` changes ``texture`` parameter type from ``Texture2D`` to ``Texture`` |✔️| |❌| |✔️| `GH-95126`_
  104. **VisualShaderNodeCubemap**
  105. Property ``cube_map`` changes type from ``Cubemap`` to ``TextureLayered`` |✔️| |❌| |❌| `GH-95126`_
  106. **VisualShaderNodeTexture2DArray**
  107. Property ``texture_array`` changes type from ``Texture2DArray`` to ``TextureLayered`` |✔️| |❌| |❌| `GH-95126`_
  108. ======================================================================================================================== =================== ==================== ==================== ============
  109. .. note::
  110. In C#, the enum ``RenderingDevice.StorageBufferUsage`` breaks compatibility because of the way the bindings generator
  111. detects the enum prefix. New members where added in `GH-100062`_ to the enum that caused the enum members to be renamed.
  112. Navigation
  113. ~~~~~~~~~~
  114. ======================================================================================================================== =================== ==================== ==================== ============
  115. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  116. ======================================================================================================================== =================== ==================== ==================== ============
  117. **NavigationServer2D**
  118. Method ``query_path`` adds a new ``callback`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100129`_
  119. **NavigationServer3D**
  120. Method ``query_path`` adds a new ``callback`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100129`_
  121. ======================================================================================================================== =================== ==================== ==================== ============
  122. Editor plugins
  123. ~~~~~~~~~~~~~~
  124. ======================================================================================================================== =================== ==================== ==================== ============
  125. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  126. ======================================================================================================================== =================== ==================== ==================== ============
  127. **EditorInterface**
  128. Method ``open_scene_from_path`` adds a new ``set_inherited`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-90057`_
  129. Method ``popup_node_selector`` adds a new ``current_value`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94323`_
  130. Method ``popup_property_selector`` adds a new ``current_value`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94323`_
  131. **EditorSceneFormatImporter**
  132. Method ``_get_import_flags`` removed |❌| |❌| |❌| `GH-101531`_
  133. **EditorTranslationParserPlugin**
  134. Method ``_parse_file`` changes return type to ``Array`` and removes ``msgids`` and ``msgids_context_plural`` parameters |❌| |❌| |❌| `GH-99297`_
  135. ======================================================================================================================== =================== ==================== ==================== ============
  136. .. note::
  137. The method ``_get_import_flags`` was never used by the engine. It was removed despite the
  138. compatibility breakage as there's no way for users to rely on this affecting engine behavior.
  139. Behavior changes
  140. ----------------
  141. Core
  142. ~~~~
  143. .. note::
  144. The ``Curve`` resource now enforces its value range, so ``min_value`` and ``max_value`` need to be changed
  145. if any of the points fall outside of the default ``[0, 1]`` range.
  146. Rendering
  147. ~~~~~~~~~
  148. .. note::
  149. The ``VisualShaderNodeVec4Constant`` shader node had its input type changed to ``Vector4``. Users need to
  150. recreate the values in their constants.
  151. CSG
  152. ~~~
  153. .. note::
  154. The CSG implementation now uses Emmett Lalish's `Manifold <https://github.com/elalish/manifold>`_ library (`GH-94321`_).
  155. The new implementation is more consistent with manifold definitions and fixes a number of bugs and stability
  156. issues. As a result, non-manifold meshes are no longer supported. You can use ``MeshInstance3D`` for
  157. rendering non-manifold geometry, such as quads or planes.
  158. Android
  159. ~~~~~~~
  160. .. note::
  161. Android sensor events are no longer enabled by default (`GH-94799`_). Projects that use sensor events can
  162. enable them as needed in Project Settings under **Input Devices > Sensors**.
  163. .. |❌| replace:: :abbr:`❌ (This API breaks compatibility.)`
  164. .. |✔️| replace:: :abbr:`✔️ (This API does not break compatibility.)`
  165. .. |✔️ with compat| replace:: :abbr:`✔️ (This API does not break compatibility. A compatibility method was added.)`
  166. .. _GH-78289: https://github.com/godotengine/godot/pull/78289
  167. .. _GH-90057: https://github.com/godotengine/godot/pull/90057
  168. .. _GH-90993: https://github.com/godotengine/godot/pull/90993
  169. .. _GH-91201: https://github.com/godotengine/godot/pull/91201
  170. .. _GH-92089: https://github.com/godotengine/godot/pull/92089
  171. .. _GH-93605: https://github.com/godotengine/godot/pull/93605
  172. .. _GH-94321: https://github.com/godotengine/godot/pull/94321
  173. .. _GH-94323: https://github.com/godotengine/godot/pull/94323
  174. .. _GH-94434: https://github.com/godotengine/godot/pull/94434
  175. .. _GH-99455: https://github.com/godotengine/godot/pull/99455
  176. .. _GH-94684: https://github.com/godotengine/godot/pull/94684
  177. .. _GH-94799: https://github.com/godotengine/godot/pull/94799
  178. .. _GH-95212: https://github.com/godotengine/godot/pull/95212
  179. .. _GH-95126: https://github.com/godotengine/godot/pull/95126
  180. .. _GH-97449: https://github.com/godotengine/godot/pull/97449
  181. .. _GH-98670: https://github.com/godotengine/godot/pull/98670
  182. .. _GH-98918: https://github.com/godotengine/godot/pull/98918
  183. .. _GH-98972: https://github.com/godotengine/godot/pull/98972
  184. .. _GH-99297: https://github.com/godotengine/godot/pull/99297
  185. .. _GH-99481: https://github.com/godotengine/godot/pull/99481
  186. .. _GH-100062: https://github.com/godotengine/godot/pull/100062
  187. .. _GH-100129: https://github.com/godotengine/godot/pull/100129
  188. .. _GH-101482: https://github.com/godotengine/godot/pull/101482
  189. .. _GH-101531: https://github.com/godotengine/godot/pull/101531
  190. .. _GH-102796: https://github.com/godotengine/godot/pull/102796