You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -324,6 +326,20 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPE
324
326
@export_file("*.txt") var notes_path: String
325
327
@export_file var level_paths: Array[String]
326
328
329
+
\ **Note:** The file will be stored and referenced as UID, if available. This ensures that the reference is valid even when the file is moved. You can use :ref:`ResourceUID<class_ResourceUID>` methods to convert it to path.
Same as :ref:`@export_file<class_@GDScript_annotation_@export_file>`, except the file will be stored as a raw path. This means that it may become invalid when the file is moved. If you are exporting a :ref:`Resource<class_Resource>` path, consider using :ref:`@export_file<class_@GDScript_annotation_@export_file>` instead.
342
+
327
343
.. rst-class:: classref-item-separator
328
344
329
345
----
@@ -999,15 +1015,16 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile
Returns a single character (as a :ref:`String<class_String>`) of the given Unicode code point (which is compatible with ASCII code).
1020
+
Returns a single character (as a :ref:`String<class_String>` of length 1) of the given Unicode code point ``code``.
1005
1021
1006
1022
::
1007
1023
1008
-
var upper = char(65) # upper is "A"
1009
-
var lower = char(65 + 32) # lower is "a"
1010
-
var euro = char(8364) # euro is "€"
1024
+
print(char(65)) # Prints "A"
1025
+
print(char(129302)) # Prints "🤖" (robot face emoji)
1026
+
1027
+
This is the inverse of :ref:`ord()<class_@GDScript_method_ord>`. See also :ref:`String.chr()<class_String_method_chr>` and :ref:`String.unicode_at()<class_String_method_unicode_at>`.
1011
1028
1012
1029
.. rst-class:: classref-item-separator
1013
1030
@@ -1196,6 +1213,25 @@ This function is a simplified version of :ref:`ResourceLoader.load()<class_Resou
Returns an integer representing the Unicode code point of the given character ``char``, which should be a string of length 1.
1223
+
1224
+
::
1225
+
1226
+
print(ord("A")) # Prints 65
1227
+
print(ord("🤖")) # Prints 129302
1228
+
1229
+
This is the inverse of :ref:`char()<class_@GDScript_method_char>`. See also :ref:`String.chr()<class_String_method_chr>` and :ref:`String.unicode_at()<class_String_method_unicode_at>`.
Hints that a :ref:`String<class_String>` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``.
3590
+
Hints that a :ref:`String<class_String>` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. By default the file will be stored as UID whenever available. You can use :ref:`ResourceUID<class_ResourceUID>` methods to convert it back to path. For storing a raw path, use :ref:`PROPERTY_HINT_FILE_PATH<class_@GlobalScope_constant_PROPERTY_HINT_FILE_PATH>`.
Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup. Use the optional hint string ``"feature"`` when the group only has variables that are meaningful when the feature is enabled.
3890
+
Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup. Use the optional hint string ``"feature"`` when the group only has properties that are meaningful when the feature is enabled.
3891
3891
3892
3892
\ **Note:** The ``"feature"`` hint string does not modify or reset any values.
3893
3893
@@ -3903,11 +3903,19 @@ Hints that a :ref:`String<class_String>` or :ref:`StringName<class_StringName>`
3903
3903
3904
3904
- If it contains ``"loose_mode"``, loose mode is enabled. This allows inserting any action name even if it's not present in the input map.
Like :ref:`PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPERTY_HINT_FILE>`, but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using :ref:`PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPERTY_HINT_FILE>` when possible.
Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
578
+
Determines the behavior of both ends of the animation timeline during animation playback. This indicates whether and how the animation should be restarted, and is also used to correctly interpolate animation cycles.
Returns the length of the audio stream in seconds.
267
+
Returns the length of the audio stream in seconds. If this stream is an :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, returns the length of the last played stream. If this stream has an indefinite length (such as for :ref:`AudioStreamGenerator<class_AudioStreamGenerator>` and :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`), returns ``0.0``.
0 commit comments