upgrading_to_godot_4.4.rst 19 KB

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