Skip to content

Commit 247506d

Browse files
authored
Merge pull request #11075 from Ayush41/export_file-breaking-change-doc
Add behavior change note for @export_file annotation in Godot 4.4
2 parents c56dc71 + 5008959 commit 247506d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tutorials/migrating/upgrading_to_godot_4.4.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,27 @@ Method ``post`` adds a new ``count`` optional parameter
5555
Method ``standardize_locale`` adds a new ``add_defaults`` optional parameter |✔️| |✔️ with compat| |✔️ with compat| `GH-98972`_
5656
======================================================================================================================== =================== ==================== ==================== ============
5757

58+
**Export annotations**
59+
60+
.. warning::
61+
62+
The behavior of ``@export_file`` changed in Godot 4.4. When assigning a new value
63+
from the Inspector, the path is now stored and returned as a ``uid://`` reference
64+
instead of the traditional ``res://`` path(`GH-97912`_). This is a **breaking change** and may
65+
cause issues if you're expecting ``res://``-based paths in scripts or serialized
66+
files.
67+
68+
For example, exported arrays of files may now contain a mix of ``uid://`` and
69+
``res://`` paths, especially if they were partially edited in the Inspector.
70+
71+
In 4.4, the only way to retain the ``res://`` format is to **manually edit** the
72+
`.tscn` or `.tres` files in a text editor. Starting in Godot 4.5, a new annotation
73+
``@export_file_path`` can be used to explicitly retain the old behavior and export
74+
raw ``res://`` paths.
75+
5876
.. [#f1] Default buffer size in 4.3 is ``1024``.
5977
78+
6079
GUI nodes
6180
~~~~~~~~~
6281

@@ -206,6 +225,7 @@ Android
206225
.. _GH-95212: https://github.com/godotengine/godot/pull/95212
207226
.. _GH-95126: https://github.com/godotengine/godot/pull/95126
208227
.. _GH-97449: https://github.com/godotengine/godot/pull/97449
228+
.. _GH-97912: https://github.com/godotengine/godot/pull/97912
209229
.. _GH-98670: https://github.com/godotengine/godot/pull/98670
210230
.. _GH-98918: https://github.com/godotengine/godot/pull/98918
211231
.. _GH-98972: https://github.com/godotengine/godot/pull/98972

0 commit comments

Comments
 (0)