|
@@ -333,20 +333,22 @@
|
|
<annotation name="@export_color_no_alpha">
|
|
<annotation name="@export_color_no_alpha">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- Export a [Color] property without allowing its transparency ([member Color.a]) to be edited.
|
|
|
|
|
|
+ Export a [Color], [Array][lb][Color][rb], or [PackedColorArray] property without allowing its transparency ([member Color.a]) to be edited.
|
|
See also [constant PROPERTY_HINT_COLOR_NO_ALPHA].
|
|
See also [constant PROPERTY_HINT_COLOR_NO_ALPHA].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_color_no_alpha var dye_color: Color
|
|
@export_color_no_alpha var dye_color: Color
|
|
|
|
+ @export_color_no_alpha var dye_colors: Array[Color]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
<annotation name="@export_dir">
|
|
<annotation name="@export_dir">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property as a path to a directory. The path will be limited to the project folder and its subfolders. See [annotation @export_global_dir] to allow picking from the entire filesystem.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], or [PackedStringArray] property as a path to a directory. The path will be limited to the project folder and its subfolders. See [annotation @export_global_dir] to allow picking from the entire filesystem.
|
|
See also [constant PROPERTY_HINT_DIR].
|
|
See also [constant PROPERTY_HINT_DIR].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_dir var sprite_folder_path: String
|
|
@export_dir var sprite_folder_path: String
|
|
|
|
+ @export_dir var sprite_folder_paths: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -354,12 +356,15 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="names" type="String" />
|
|
<param index="0" name="names" type="String" />
|
|
<description>
|
|
<description>
|
|
- Export an [int] or [String] property as an enumerated list of options. If the property is an [int], then the index of the value is stored, in the same order the values are provided. You can add explicit values using a colon. If the property is a [String], then the value is stored.
|
|
|
|
|
|
+ Export an [int], [String], [Array][lb][int][rb], [Array][lb][String][rb], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], or [PackedStringArray] property as an enumerated list of options (or an array of options). If the property is an [int], then the index of the value is stored, in the same order the values are provided. You can add explicit values using a colon. If the property is a [String], then the value is stored.
|
|
See also [constant PROPERTY_HINT_ENUM].
|
|
See also [constant PROPERTY_HINT_ENUM].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_enum("Warrior", "Magician", "Thief") var character_class: int
|
|
@export_enum("Warrior", "Magician", "Thief") var character_class: int
|
|
@export_enum("Slow:30", "Average:60", "Very Fast:200") var character_speed: int
|
|
@export_enum("Slow:30", "Average:60", "Very Fast:200") var character_speed: int
|
|
@export_enum("Rebecca", "Mary", "Leah") var character_name: String
|
|
@export_enum("Rebecca", "Mary", "Leah") var character_name: String
|
|
|
|
+
|
|
|
|
+ @export_enum("Sword", "Spear", "Mace") var character_items: Array[int]
|
|
|
|
+ @export_enum("double_jump", "climb", "dash") var character_skills: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
If you want to set an initial value, you must specify it explicitly:
|
|
If you want to set an initial value, you must specify it explicitly:
|
|
[codeblock]
|
|
[codeblock]
|
|
@@ -369,6 +374,9 @@
|
|
[codeblock]
|
|
[codeblock]
|
|
enum CharacterName {REBECCA, MARY, LEAH}
|
|
enum CharacterName {REBECCA, MARY, LEAH}
|
|
@export var character_name: CharacterName
|
|
@export var character_name: CharacterName
|
|
|
|
+
|
|
|
|
+ enum CharacterItem {SWORD, SPEAR, MACE}
|
|
|
|
+ @export var character_items: Array[CharacterItem]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -382,6 +390,7 @@
|
|
@export_exp_easing var transition_speed
|
|
@export_exp_easing var transition_speed
|
|
@export_exp_easing("attenuation") var fading_attenuation
|
|
@export_exp_easing("attenuation") var fading_attenuation
|
|
@export_exp_easing("positive_only") var effect_power
|
|
@export_exp_easing("positive_only") var effect_power
|
|
|
|
+ @export_exp_easing var speeds: Array[float]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -389,12 +398,13 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="filter" type="String" default="""" />
|
|
<param index="0" name="filter" type="String" default="""" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property as a path to a file. The path will be limited to the project folder and its subfolders. See [annotation @export_global_file] to allow picking from the entire filesystem.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], or [PackedStringArray] property as a path to a file. The path will be limited to the project folder and its subfolders. See [annotation @export_global_file] to allow picking from the entire filesystem.
|
|
If [param filter] is provided, only matching files will be available for picking.
|
|
If [param filter] is provided, only matching files will be available for picking.
|
|
See also [constant PROPERTY_HINT_FILE].
|
|
See also [constant PROPERTY_HINT_FILE].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_file var sound_effect_path: String
|
|
@export_file var sound_effect_path: String
|
|
@export_file("*.txt") var notes_path: String
|
|
@export_file("*.txt") var notes_path: String
|
|
|
|
+ @export_file var level_paths: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -421,6 +431,10 @@
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags("A:16", "B", "C") var x
|
|
@export_flags("A:16", "B", "C") var x
|
|
[/codeblock]
|
|
[/codeblock]
|
|
|
|
+ You can also use the annotation on [Array][lb][int][rb], [PackedByteArray], [PackedInt32Array], and [PackedInt64Array]
|
|
|
|
+ [codeblock]
|
|
|
|
+ @export_flags("Fire", "Water", "Earth", "Wind") var phase_elements: Array[int]
|
|
|
|
+ [/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
<annotation name="@export_flags_2d_navigation">
|
|
<annotation name="@export_flags_2d_navigation">
|
|
@@ -430,6 +444,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_NAVIGATION].
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_NAVIGATION].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_2d_navigation var navigation_layers: int
|
|
@export_flags_2d_navigation var navigation_layers: int
|
|
|
|
+ @export_flags_2d_navigation var navigation_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -440,6 +455,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_PHYSICS].
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_PHYSICS].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_2d_physics var physics_layers: int
|
|
@export_flags_2d_physics var physics_layers: int
|
|
|
|
+ @export_flags_2d_physics var physics_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -450,6 +466,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_RENDER].
|
|
See also [constant PROPERTY_HINT_LAYERS_2D_RENDER].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_2d_render var render_layers: int
|
|
@export_flags_2d_render var render_layers: int
|
|
|
|
+ @export_flags_2d_render var render_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -460,6 +477,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_NAVIGATION].
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_NAVIGATION].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_3d_navigation var navigation_layers: int
|
|
@export_flags_3d_navigation var navigation_layers: int
|
|
|
|
+ @export_flags_3d_navigation var navigation_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -470,6 +488,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_PHYSICS].
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_PHYSICS].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_3d_physics var physics_layers: int
|
|
@export_flags_3d_physics var physics_layers: int
|
|
|
|
+ @export_flags_3d_physics var physics_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -480,6 +499,7 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_RENDER].
|
|
See also [constant PROPERTY_HINT_LAYERS_3D_RENDER].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_3d_render var render_layers: int
|
|
@export_flags_3d_render var render_layers: int
|
|
|
|
+ @export_flags_3d_render var render_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -490,16 +510,18 @@
|
|
See also [constant PROPERTY_HINT_LAYERS_AVOIDANCE].
|
|
See also [constant PROPERTY_HINT_LAYERS_AVOIDANCE].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_flags_avoidance var avoidance_layers: int
|
|
@export_flags_avoidance var avoidance_layers: int
|
|
|
|
+ @export_flags_avoidance var avoidance_layers_array: Array[int]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
<annotation name="@export_global_dir">
|
|
<annotation name="@export_global_dir">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property as an absolute path to a directory. The path can be picked from the entire filesystem. See [annotation @export_dir] to limit it to the project folder and its subfolders.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], or [PackedStringArray] property as an absolute path to a directory. The path can be picked from the entire filesystem. See [annotation @export_dir] to limit it to the project folder and its subfolders.
|
|
See also [constant PROPERTY_HINT_GLOBAL_DIR].
|
|
See also [constant PROPERTY_HINT_GLOBAL_DIR].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_global_dir var sprite_folder_path: String
|
|
@export_global_dir var sprite_folder_path: String
|
|
|
|
+ @export_global_dir var sprite_folder_paths: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -507,12 +529,13 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="filter" type="String" default="""" />
|
|
<param index="0" name="filter" type="String" default="""" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property as an absolute path to a file. The path can be picked from the entire filesystem. See [annotation @export_file] to limit it to the project folder and its subfolders.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], or [PackedStringArray] property as an absolute path to a file. The path can be picked from the entire filesystem. See [annotation @export_file] to limit it to the project folder and its subfolders.
|
|
If [param filter] is provided, only matching files will be available for picking.
|
|
If [param filter] is provided, only matching files will be available for picking.
|
|
See also [constant PROPERTY_HINT_GLOBAL_FILE].
|
|
See also [constant PROPERTY_HINT_GLOBAL_FILE].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_global_file var sound_effect_path: String
|
|
@export_global_file var sound_effect_path: String
|
|
@export_global_file("*.txt") var notes_path: String
|
|
@export_global_file("*.txt") var notes_path: String
|
|
|
|
+ @export_global_file var multiple_paths: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -542,10 +565,11 @@
|
|
<annotation name="@export_multiline">
|
|
<annotation name="@export_multiline">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property with a large [TextEdit] widget instead of a [LineEdit]. This adds support for multiline content and makes it easier to edit large amount of text stored in the property.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], [PackedStringArray], [Dictionary] or [Array][lb][Dictionary][rb] property with a large [TextEdit] widget instead of a [LineEdit]. This adds support for multiline content and makes it easier to edit large amount of text stored in the property.
|
|
See also [constant PROPERTY_HINT_MULTILINE_TEXT].
|
|
See also [constant PROPERTY_HINT_MULTILINE_TEXT].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_multiline var character_biography
|
|
@export_multiline var character_biography
|
|
|
|
+ @export_multiline var npc_dialogs: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -553,10 +577,11 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="type" type="String" default="""" />
|
|
<param index="0" name="type" type="String" default="""" />
|
|
<description>
|
|
<description>
|
|
- Export a [NodePath] property with a filter for allowed node types.
|
|
|
|
|
|
+ Export a [NodePath] or [Array][lb][NodePath][rb] property with a filter for allowed node types.
|
|
See also [constant PROPERTY_HINT_NODE_PATH_VALID_TYPES].
|
|
See also [constant PROPERTY_HINT_NODE_PATH_VALID_TYPES].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_node_path("Button", "TouchScreenButton") var some_button
|
|
@export_node_path("Button", "TouchScreenButton") var some_button
|
|
|
|
+ @export_node_path("Button", "TouchScreenButton") var many_buttons: Array[NodePath]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
[b]Note:[/b] The type must be a native class or a globally registered script (using the [code]class_name[/code] keyword) that inherits [Node].
|
|
[b]Note:[/b] The type must be a native class or a globally registered script (using the [code]class_name[/code] keyword) that inherits [Node].
|
|
</description>
|
|
</description>
|
|
@@ -565,10 +590,11 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="placeholder" type="String" />
|
|
<param index="0" name="placeholder" type="String" />
|
|
<description>
|
|
<description>
|
|
- Export a [String] property with a placeholder text displayed in the editor widget when no value is present.
|
|
|
|
|
|
+ Export a [String], [Array][lb][String][rb], or [PackedStringArray] property with a placeholder text displayed in the editor widget when no value is present.
|
|
See also [constant PROPERTY_HINT_PLACEHOLDER_TEXT].
|
|
See also [constant PROPERTY_HINT_PLACEHOLDER_TEXT].
|
|
[codeblock]
|
|
[codeblock]
|
|
@export_placeholder("Name in lowercase") var character_id: String
|
|
@export_placeholder("Name in lowercase") var character_id: String
|
|
|
|
+ @export_placeholder("Name in lowercase") var friend_ids: Array[String]
|
|
[/codeblock]
|
|
[/codeblock]
|
|
</description>
|
|
</description>
|
|
</annotation>
|
|
</annotation>
|
|
@@ -579,7 +605,7 @@
|
|
<param index="2" name="step" type="float" default="1.0" />
|
|
<param index="2" name="step" type="float" default="1.0" />
|
|
<param index="3" name="extra_hints" type="String" default="""" />
|
|
<param index="3" name="extra_hints" type="String" default="""" />
|
|
<description>
|
|
<description>
|
|
- Export an [int] or [float] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [member EditorSettings.interface/inspector/default_float_step] setting.
|
|
|
|
|
|
+ Export an [int], [float], [Array][lb][int][rb], [Array][lb][float][rb], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], or [PackedFloat64Array] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [member EditorSettings.interface/inspector/default_float_step] setting.
|
|
If hints [code]"or_greater"[/code] and [code]"or_less"[/code] are provided, the editor widget will not cap the value at range boundaries. The [code]"exp"[/code] hint will make the edited values on range to change exponentially. The [code]"hide_slider"[/code] hint will hide the slider element of the editor widget.
|
|
If hints [code]"or_greater"[/code] and [code]"or_less"[/code] are provided, the editor widget will not cap the value at range boundaries. The [code]"exp"[/code] hint will make the edited values on range to change exponentially. The [code]"hide_slider"[/code] hint will hide the slider element of the editor widget.
|
|
Hints also allow to indicate the units for the edited value. Using [code]"radians_as_degrees"[/code] you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). [code]"degrees"[/code] allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using [code]"suffix:unit"[/code], where "unit" can be any string.
|
|
Hints also allow to indicate the units for the edited value. Using [code]"radians_as_degrees"[/code] you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). [code]"degrees"[/code] allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using [code]"suffix:unit"[/code], where "unit" can be any string.
|
|
See also [constant PROPERTY_HINT_RANGE].
|
|
See also [constant PROPERTY_HINT_RANGE].
|
|
@@ -587,6 +613,7 @@
|
|
@export_range(0, 20) var number
|
|
@export_range(0, 20) var number
|
|
@export_range(-10, 20) var number
|
|
@export_range(-10, 20) var number
|
|
@export_range(-10, 20, 0.2) var number: float
|
|
@export_range(-10, 20, 0.2) var number: float
|
|
|
|
+ @export_range(0, 20) var numbers: Array[float]
|
|
|
|
|
|
@export_range(0, 100, 1, "or_greater") var power_percent
|
|
@export_range(0, 100, 1, "or_greater") var power_percent
|
|
@export_range(0, 100, 1, "or_greater", "or_less") var health_delta
|
|
@export_range(0, 100, 1, "or_greater", "or_less") var health_delta
|