upgrading_to_godot_4.4.rst 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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 |✔️| |✔️ with compat| |✔️ with compat| `GH-98972`_
  48. ======================================================================================================================== =================== ==================== ==================== ============
  49. **Export annotations**
  50. .. warning::
  51. The behavior of ``@export_file`` changed in Godot 4.4. When assigning a new value
  52. from the Inspector, the path is now stored and returned as a ``uid://`` reference
  53. instead of the traditional ``res://`` path(`GH-97912`_). This is a **breaking change** and may
  54. cause issues if you're expecting ``res://``-based paths in scripts or serialized
  55. files.
  56. For example, exported arrays of files may now contain a mix of ``uid://`` and
  57. ``res://`` paths, especially if they were partially edited in the Inspector.
  58. In 4.4, the only way to retain the ``res://`` format is to **manually edit** the
  59. `.tscn` or `.tres` files in a text editor. Starting in Godot 4.5, a new annotation
  60. ``@export_file_path`` can be used to explicitly retain the old behavior and export
  61. raw ``res://`` paths.
  62. .. [#f1] Default buffer size in 4.3 is ``1024``.
  63. GUI nodes
  64. ~~~~~~~~~
  65. ======================================================================================================================== =================== ==================== ==================== ============
  66. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  67. ======================================================================================================================== =================== ==================== ==================== ============
  68. **RichTextLabel**
  69. Method ``push_meta`` adds a new ``tooltip`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-99481`_
  70. Method ``set_table_column_expand`` adds a new ``shrink`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-101482`_
  71. **GraphEdit**
  72. Method ``connect_node`` adds a new ``keep_alive`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-97449`_
  73. Signal ``frame_rect_changed`` changes ``new_rect`` parameter type from ``Vector2`` to ``Rect2`` |❌| |❌| |❌| `GH-102796`_
  74. ======================================================================================================================== =================== ==================== ==================== ============
  75. Physics
  76. ~~~~~~~
  77. ======================================================================================================================== =================== ==================== ==================== ============
  78. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  79. ======================================================================================================================== =================== ==================== ==================== ============
  80. **SoftBody3D**
  81. Method ``set_point_pinned`` adds a new ``insert_at`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94684`_
  82. ======================================================================================================================== =================== ==================== ==================== ============
  83. Rendering
  84. ~~~~~~~~~
  85. ======================================================================================================================== =================== ==================== ==================== ============
  86. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  87. ======================================================================================================================== =================== ==================== ==================== ============
  88. **CPUParticles2D**
  89. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  90. **CPUParticles3D**
  91. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  92. **GPUParticles2D**
  93. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  94. **GPUParticles3D**
  95. Method ``restart`` adds a new ``keep_seed`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-92089`_
  96. **RenderingDevice**
  97. Method ``draw_list_begin`` adds a new ``breadcrumb`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-90993`_
  98. Method ``draw_list_begin`` removes many parameters |❌| |✔️ with compat| |✔️ with compat| `GH-98670`_
  99. Method ``index_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  100. Method ``uniform_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  101. Method ``vertex_buffer_create`` adds a new ``enable_device_address`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100062`_
  102. **RenderingServer**
  103. Method ``multimesh_allocate_data`` adds a new ``use_indirect`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-99455`_
  104. **Shader**
  105. Method ``get_default_texture_parameter`` changes return type from ``Texture2D`` to ``Texture`` |✔️| |❌| |❌| `GH-95126`_
  106. Method ``set_default_texture_parameter`` changes ``texture`` parameter type from ``Texture2D`` to ``Texture`` |✔️| |❌| |✔️| `GH-95126`_
  107. **VisualShaderNodeCubemap**
  108. Property ``cube_map`` changes type from ``Cubemap`` to ``TextureLayered`` |✔️| |❌| |❌| `GH-95126`_
  109. **VisualShaderNodeTexture2DArray**
  110. Property ``texture_array`` changes type from ``Texture2DArray`` to ``TextureLayered`` |✔️| |❌| |❌| `GH-95126`_
  111. ======================================================================================================================== =================== ==================== ==================== ============
  112. .. note::
  113. In C#, the enum ``RenderingDevice.StorageBufferUsage`` breaks compatibility because of the way the bindings generator
  114. detects the enum prefix. New members where added in `GH-100062`_ to the enum that caused the enum members to be renamed.
  115. Navigation
  116. ~~~~~~~~~~
  117. ======================================================================================================================== =================== ==================== ==================== ============
  118. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  119. ======================================================================================================================== =================== ==================== ==================== ============
  120. **NavigationServer2D**
  121. Method ``query_path`` adds a new ``callback`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100129`_
  122. **NavigationServer3D**
  123. Method ``query_path`` adds a new ``callback`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-100129`_
  124. ======================================================================================================================== =================== ==================== ==================== ============
  125. Editor plugins
  126. ~~~~~~~~~~~~~~
  127. ======================================================================================================================== =================== ==================== ==================== ============
  128. Change GDScript Compatible C# Binary Compatible C# Source Compatible Introduced
  129. ======================================================================================================================== =================== ==================== ==================== ============
  130. **EditorInterface**
  131. Method ``open_scene_from_path`` adds a new ``set_inherited`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-90057`_
  132. Method ``popup_node_selector`` adds a new ``current_value`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94323`_
  133. Method ``popup_property_selector`` adds a new ``current_value`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-94323`_
  134. **EditorSceneFormatImporter**
  135. Method ``_get_import_flags`` removed |❌| |❌| |❌| `GH-101531`_
  136. **EditorTranslationParserPlugin**
  137. Method ``_parse_file`` changes return type to ``Array`` and removes ``msgids`` and ``msgids_context_plural`` parameters |❌| |❌| |❌| `GH-99297`_
  138. ======================================================================================================================== =================== ==================== ==================== ============
  139. .. note::
  140. The method ``_get_import_flags`` was never used by the engine. It was removed despite the
  141. compatibility breakage as there's no way for users to rely on this affecting engine behavior.
  142. Behavior changes
  143. ----------------
  144. Core
  145. ~~~~
  146. .. note::
  147. The ``Curve`` resource now enforces its value range, so ``min_value`` and ``max_value`` need to be changed
  148. if any of the points fall outside of the default ``[0, 1]`` range.
  149. Rendering
  150. ~~~~~~~~~
  151. .. note::
  152. The ``VisualShaderNodeVec4Constant`` shader node had its input type changed to ``Vector4``. Users need to
  153. recreate the values in their constants.
  154. CSG
  155. ~~~
  156. .. note::
  157. The CSG implementation now uses Emmett Lalish's `Manifold <https://github.com/elalish/manifold>`_ library (`GH-94321`_).
  158. The new implementation is more consistent with manifold definitions and fixes a number of bugs and stability
  159. issues. As a result, non-manifold meshes are no longer supported. You can use ``MeshInstance3D`` for
  160. rendering non-manifold geometry, such as quads or planes.
  161. Android
  162. ~~~~~~~
  163. .. note::
  164. Android sensor events are no longer enabled by default (`GH-94799`_). Projects that use sensor events can
  165. enable them as needed in Project Settings under **Input Devices > Sensors**.
  166. .. |❌| replace:: :abbr:`❌ (This API breaks compatibility.)`
  167. .. |✔️| replace:: :abbr:`✔️ (This API does not break compatibility.)`
  168. .. |✔️ with compat| replace:: :abbr:`✔️ (This API does not break compatibility. A compatibility method was added.)`
  169. .. _GH-78289: https://github.com/godotengine/godot/pull/78289
  170. .. _GH-90057: https://github.com/godotengine/godot/pull/90057
  171. .. _GH-90993: https://github.com/godotengine/godot/pull/90993
  172. .. _GH-91201: https://github.com/godotengine/godot/pull/91201
  173. .. _GH-92089: https://github.com/godotengine/godot/pull/92089
  174. .. _GH-93605: https://github.com/godotengine/godot/pull/93605
  175. .. _GH-94321: https://github.com/godotengine/godot/pull/94321
  176. .. _GH-94323: https://github.com/godotengine/godot/pull/94323
  177. .. _GH-94434: https://github.com/godotengine/godot/pull/94434
  178. .. _GH-99455: https://github.com/godotengine/godot/pull/99455
  179. .. _GH-94684: https://github.com/godotengine/godot/pull/94684
  180. .. _GH-94799: https://github.com/godotengine/godot/pull/94799
  181. .. _GH-95212: https://github.com/godotengine/godot/pull/95212
  182. .. _GH-95126: https://github.com/godotengine/godot/pull/95126
  183. .. _GH-97449: https://github.com/godotengine/godot/pull/97449
  184. .. _GH-97912: https://github.com/godotengine/godot/pull/97912
  185. .. _GH-98670: https://github.com/godotengine/godot/pull/98670
  186. .. _GH-98918: https://github.com/godotengine/godot/pull/98918
  187. .. _GH-98972: https://github.com/godotengine/godot/pull/98972
  188. .. _GH-99297: https://github.com/godotengine/godot/pull/99297
  189. .. _GH-99481: https://github.com/godotengine/godot/pull/99481
  190. .. _GH-100062: https://github.com/godotengine/godot/pull/100062
  191. .. _GH-100129: https://github.com/godotengine/godot/pull/100129
  192. .. _GH-101482: https://github.com/godotengine/godot/pull/101482
  193. .. _GH-101531: https://github.com/godotengine/godot/pull/101531
  194. .. _GH-102796: https://github.com/godotengine/godot/pull/102796