feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -2926,7 +2926,7 @@
Hints that a property is an [Array] with the stored type specified in the hint string.
</constant>
<constant name="PROPERTY_HINT_DICTIONARY_TYPE" value="38" enum="PropertyHint">
Hints that a property is a [Dictionary] with the stored types specified in the hint string.
Hints that a property is a [Dictionary] with the stored types specified in the hint string. The hint string contains the key and value types separated by a semicolon (e.g. [code]"int;String"[/code]).
</constant>
<constant name="PROPERTY_HINT_LOCALE_ID" value="32" enum="PropertyHint">
Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.

View file

@ -73,8 +73,10 @@
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" overrides="Window" default="true" />
<member name="keep_title_visible" type="bool" setter="set_keep_title_visible" getter="get_keep_title_visible" overrides="Window" default="true" />
<member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" default="&quot;OK&quot;">
The text displayed by the OK button (see [method get_ok_button]).
<member name="maximize_disabled" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="minimize_disabled" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" default="&quot;&quot;">
The text displayed by the OK button (see [method get_ok_button]). If empty, a default text will be used.
</member>
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Alert!&quot;" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />

View file

@ -54,7 +54,7 @@
<param index="0" name="frame" type="int" />
<param index="1" name="progress" type="float" />
<description>
Sets [member frame] the [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly.
Sets [member frame] and [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly.
[b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]:
[codeblocks]
[gdscript]

View file

@ -53,7 +53,7 @@
<param index="0" name="frame" type="int" />
<param index="1" name="progress" type="float" />
<description>
Sets [member frame] the [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly.
Sets [member frame] and [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly.
[b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]:
[codeblocks]
[gdscript]

View file

@ -135,7 +135,7 @@
move_and_slide()
[/gdscript]
[/codeblocks]
If [member root_motion_local] is [code]true[/code], return the pre-multiplied translation value with the inverted rotation.
If [member root_motion_local] is [code]true[/code], returns the pre-multiplied translation value with the inverted rotation.
In this case, the code can be written as follows:
[codeblocks]
[gdscript]

View file

@ -90,7 +90,7 @@
<method name="has_section" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is currently playing with section.
Returns [code]true[/code] if an animation is currently playing with a section.
</description>
</method>
<method name="is_playing" qualifiers="const">
@ -208,7 +208,7 @@
<method name="reset_section">
<return type="void" />
<description>
Resets the current section if section is set.
Resets the current section. Does nothing if a section has not been set.
</description>
</method>
<method name="seek">

View file

@ -488,7 +488,7 @@
<param index="0" name="position" type="int" />
<param index="1" name="value" type="Variant" />
<description>
Inserts a new element ([param value]) at a given index ([param position]) in the array. [param position] should be between [code]0[/code] and the array's [method size].
Inserts a new element ([param value]) at a given index ([param position]) in the array. [param position] should be between [code]0[/code] and the array's [method size]. If negative, [param position] is considered relative to the end of the array.
Returns [constant OK] on success, or one of the other [enum Error] constants if this method fails.
[b]Note:[/b] Every element's index after [param position] needs to be shifted forward, which may have a noticeable performance cost, especially on larger arrays.
</description>
@ -663,7 +663,7 @@
<return type="void" />
<param index="0" name="position" type="int" />
<description>
Removes the element from the array at the given index ([param position]). If the index is out of bounds, this method fails.
Removes the element from the array at the given index ([param position]). If the index is out of bounds, this method fails. If the index is negative, [param position] is considered relative to the end of the array.
If you need to return the removed element, use [method pop_at]. To remove an element by value, use [method erase] instead.
[b]Note:[/b] This method shifts every element's index after [param position] back, which may have a noticeable performance cost, especially on larger arrays.
[b]Note:[/b] The [param position] cannot be negative. To remove an element relative to the end of the array, use [code]arr.remove_at(arr.size() - (i + 1))[/code]. To remove the last element from the array, use [code]arr.resize(arr.size() - 1)[/code].
@ -674,7 +674,7 @@
<param index="0" name="size" type="int" />
<description>
Sets the array's number of elements to [param size]. If [param size] is smaller than the array's current size, the elements at the end are removed. If [param size] is greater, new default elements (usually [code]null[/code]) are added, depending on the array's type.
Returns [constant OK] on success, or one of the other [enum Error] constants if this method fails.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_LOCKED] if the array is read-only, [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
[b]Note:[/b] Calling this method once and assigning the new values is faster than calling [method append] for every new element.
</description>
</method>

View file

@ -12,7 +12,7 @@
</tutorials>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4.
Determines how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from [code]0.1[/code] to [code]4.0[/code].
</member>
<member name="feedback" type="float" setter="set_feedback" getter="get_feedback" default="0.7">
Output percent of modified sound. Value can range from 0.1 to 0.9.

View file

@ -94,7 +94,9 @@
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
<member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/3d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/3d_panning_strength] by this factor. If the product is [code]0.0[/code] then stereo panning is disabled and the volume is the same for all channels. If the product is [code]1.0[/code] then one of the channels will be muted when the sound is located exactly to the left (or right) of the listener.
Two speaker stereo arrangements implement the [url=https://webaudio.github.io/web-audio-api/#stereopanner-algorithm]WebAudio standard for StereoPannerNode Panning[/url] where the volume is cosine of half the azimuth angle to the ear.
For other speaker arrangements such as the 5.1 and 7.1 the SPCAP (Speaker-Placement Correction Amplitude) algorithm is implemented.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.

View file

@ -215,7 +215,7 @@
Texture that specifies how much surface emits light at a given point.
</member>
<member name="fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the object is rendered at the same size regardless of distance.
If [code]true[/code], the object is rendered at the same size regardless of distance. The object's size on screen is the same as if the camera was [code]1.0[/code] units away from the object's origin, regardless of the actual distance from the camera. The [Camera3D]'s field of view (or [member Camera3D.size] when in orthogonal/frustum mode) still affects the size the object is drawn at.
</member>
<member name="grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false">
If [code]true[/code], enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its [member cull_mode] set to [constant CULL_FRONT]. See also [member grow_amount].

View file

@ -18,7 +18,7 @@
<method name="get_skeleton">
<return type="Skeleton3D" />
<description>
Get parent or external [Skeleton3D] node if found.
Returns the parent or external [Skeleton3D] node if it exists, otherwise returns [code]null[/code].
</description>
</method>
<method name="get_use_external_skeleton" qualifiers="const">

View file

@ -46,6 +46,9 @@
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle.
</member>
<member name="autowrap_trim_flags" type="int" setter="set_autowrap_trim_flags" getter="get_autowrap_trim_flags" enum="TextServer.LineBreakFlag" is_bitfield="true" default="128">
Autowrap space trimming flags. See [constant TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
If [code]true[/code], text that is too large to fit the button is clipped horizontally. If [code]false[/code], the button will always be wide enough to hold the text. The text is not vertically clipped, and the button's height is not affected by this property.
</member>

View file

@ -142,6 +142,9 @@
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000">
Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_enabled" type="bool" setter="set_limit_enabled" getter="is_limit_enabled" default="true">
If [code]true[/code], the limits will be enabled. Disabling this will allow the camera to focus anywhere, when the four [code]limit_*[/code] properties will not work.
</member>
<member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000">
Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>

View file

@ -45,6 +45,12 @@
</description>
</method>
</methods>
<members>
<member name="monitoring_feeds" type="bool" setter="set_monitoring_feeds" getter="is_monitoring_feeds" default="false">
If [code]true[/code], the server is actively monitoring available camera feeds.
This has a performance cost, so only set it to [code]true[/code] when you're actively accessing the camera.
</member>
</members>
<signals>
<signal name="camera_feed_added">
<param index="0" name="id" type="int" />

View file

@ -416,19 +416,20 @@
<method name="force_update_transform">
<return type="void" />
<description>
Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
Forces the node's transform to update. Fails if the node is not inside the tree. See also [method get_transform].
[b]Note:[/b] For performance reasons, transform changes are usually accumulated and applied [i]once[/i] at the end of the frame. The update propagates through [CanvasItem] children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations).
</description>
</method>
<method name="get_canvas" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of the [World2D] canvas where this item is in.
Returns the [RID] of the [World2D] canvas where this node is registered to, used by the [RenderingServer].
</description>
</method>
<method name="get_canvas_item" qualifiers="const">
<return type="RID" />
<description>
Returns the canvas item RID used by [RenderingServer] for this item.
Returns the internal canvas item [RID] used by the [RenderingServer] for this node.
</description>
</method>
<method name="get_canvas_layer_node" qualifiers="const">
@ -440,13 +441,13 @@
<method name="get_canvas_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s coordinate system.
Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport's coordinate system. See also [method Node.get_viewport].
</description>
</method>
<method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].
Returns mouse cursor's global position relative to the [CanvasLayer] that contains this node.
[b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position].
</description>
</method>
@ -485,32 +486,33 @@
<method name="get_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform matrix of this item.
Returns the transform matrix of this [CanvasItem].
</description>
</method>
<method name="get_viewport_rect" qualifiers="const">
<return type="Rect2" />
<description>
Returns the viewport's boundaries as a [Rect2].
Returns this node's viewport boundaries as a [Rect2]. See also [method Node.get_viewport].
</description>
</method>
<method name="get_viewport_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s embedders coordinate system.
Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport embedder's coordinate system. See also [method Viewport.get_final_transform] and [method Node.get_viewport].
</description>
</method>
<method name="get_visibility_layer_bit" qualifiers="const">
<return type="bool" />
<param index="0" name="layer" type="int" />
<description>
Returns an individual bit on the rendering visibility layer.
Returns [code]true[/code] if the layer at the given index is set in [member visibility_layer].
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D" />
<description>
Returns the [World2D] where this item is in.
Returns the [World2D] this node is registered to.
Usually, this is the same as this node's viewport (see [method Node.get_viewport] and [method Viewport.find_world_2d]).
</description>
</method>
<method name="hide">
@ -522,13 +524,13 @@
<method name="is_local_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if local transform notifications are communicated to children.
Returns [code]true[/code] if the node receives [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes. This is enabled with [method set_notify_local_transform].
</description>
</method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if global transform notifications are communicated to children.
Returns [code]true[/code] if the node receives [constant NOTIFICATION_TRANSFORM_CHANGED] whenever its global transform changes. This is enabled with [method set_notify_transform].
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
@ -554,14 +556,13 @@
<return type="InputEvent" />
<param index="0" name="event" type="InputEvent" />
<description>
Transformations issued by [param event]'s inputs are applied in local space instead of global space.
Returns a copy of the given [param event] with its coordinates converted from global space to this [CanvasItem]'s local space. If not possible, returns the same [InputEvent] unchanged.
</description>
</method>
<method name="move_to_front">
<return type="void" />
<description>
Moves this node to display on top of its siblings.
Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent.
Moves this node below its siblings, usually causing the node to draw on top of its siblings. Does nothing if this node does not have a parent. See also [method Node.move_child].
</description>
</method>
<method name="queue_redraw">
@ -584,14 +585,16 @@
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes.
If [code]true[/code], the node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes.
[b]Note:[/b] Many canvas items such as [Bone2D] or [CollisionShape2D] automatically enable this in order to function correctly.
</description>
</method>
<method name="set_notify_transform">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes.
If [code]true[/code], the node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] whenever global transform changes.
[b]Note:[/b] Many canvas items such as [Camera2D] or [Light2D] automatically enable this in order to function correctly.
</description>
</method>
<method name="set_visibility_layer_bit">
@ -605,14 +608,15 @@
<method name="show">
<return type="void" />
<description>
Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code].
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
</methods>
<members>
<member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
Allows the current node to clip child nodes, essentially acting as a mask.
[b]Note:[/b] Clipping nodes cannot be nested or placed within [CanvasGroup]s. If an ancestor of this node clips its children or is a [CanvasGroup], then this node's clip mode should be set to [constant CLIP_CHILDREN_DISABLED] to avoid unexpected behavior.
The mode in which this node clips its children, acting as a mask.
[b]Note:[/b] Clipping nodes cannot be nested or placed within a [CanvasGroup]. If an ancestor of this node clips its children or is a [CanvasGroup], then this node's clip mode should be set to [constant CLIP_CHILDREN_DISABLED] to avoid unexpected behavior.
</member>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
@ -625,22 +629,22 @@
</member>
<member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)">
The color applied to this [CanvasItem]. This property does [b]not[/b] affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children.
[b]Note:[/b] Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see [code]include_internal[/code] parameter of [method Node.get_child] and other similar methods).
[b]Note:[/b] Internal children are also not affected by this property (see the [code]include_internal[/code] parameter in [method Node.add_child]). For built-in nodes this includes sliders in [ColorPicker], and the tab bar in [TabContainer].
</member>
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
If [code]true[/code], the object draws behind its parent.
If [code]true[/code], this node draws behind its parent.
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
The texture filtering mode to use on this [CanvasItem].
The filtering mode used to render this [CanvasItem]'s texture(s).
</member>
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
The texture repeating mode to use on this [CanvasItem].
The repeating mode used to render this [CanvasItem]'s texture(s).
</member>
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], this [CanvasItem] will [i]not[/i] inherit its transform from parent [CanvasItem]s. Its draw order will also be changed to make it draw on top of other [CanvasItem]s that do not have [member top_level] set to [code]true[/code]. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node].
</member>
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
If [code]true[/code], the parent [CanvasItem]'s [member material] is used as this node's material.
</member>
<member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1">
The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.
@ -655,11 +659,12 @@
Nodes sort relative to each other only if they are on the same [member z_index].
</member>
<member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true">
If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5.
If [code]true[/code], this node's final Z index is relative to its parent's Z index.
For example, if [member z_index] is [code]2[/code] and its parent's final Z index is [code]3[/code], then this node's final Z index will be [code]5[/code] ([code]2 + 3[/code]).
</member>
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive).
[b]Note:[/b] Changing the Z index of a [Control] only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others.
The order in which this node is drawn. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive).
[b]Note:[/b] The Z index does [b]not[/b] affect the order in which [CanvasItem] nodes are processed or the way input events are handled. This is especially important to keep in mind for [Control] nodes.
</member>
</members>
<signals>
@ -671,7 +676,7 @@
</signal>
<signal name="hidden">
<description>
Emitted when the [CanvasItem] is hidden, i.e. it's no longer visible in the tree (see [method is_visible_in_tree]).
Emitted when this node becomes hidden, i.e. it's no longer visible in the tree (see [method is_visible_in_tree]).
</description>
</signal>
<signal name="item_rect_changed">
@ -682,21 +687,25 @@
<signal name="visibility_changed">
<description>
Emitted when the [CanvasItem]'s visibility changes, either because its own [member visible] property changed or because its visibility in the tree changed (see [method is_visible_in_tree]).
This signal is emitted [i]after[/i] the related [constant NOTIFICATION_VISIBILITY_CHANGED] notification.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform].
Notification received when this node's global transform changes, if [method is_transform_notification_enabled] is [code]true[/code]. See also [method set_notify_transform] and [method get_transform].
[b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionObject2D] automatically enable this in order to function correctly.
</constant>
<constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="35">
The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform].
Notification received when this node's transform changes, if [method is_local_transform_notification_enabled] is [code]true[/code]. This is not received when a parent [Node2D]'s transform changes. See also [method set_notify_local_transform].
[b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionShape2D] automatically enable this in order to function correctly.
</constant>
<constant name="NOTIFICATION_DRAW" value="30">
The [CanvasItem] is requested to draw (see [method _draw]).
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
The [CanvasItem]'s visibility has changed.
Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]).
This notification is received [i]before[/i] the related [signal visibility_changed] signal.
</constant>
<constant name="NOTIFICATION_ENTER_CANVAS" value="32">
The [CanvasItem] has entered the canvas.
@ -705,7 +714,7 @@
The [CanvasItem] has exited the canvas.
</constant>
<constant name="NOTIFICATION_WORLD_2D_CHANGED" value="36">
The [CanvasItem]'s active [World2D] changed.
Notification received when this [CanvasItem] is registered to a new [World2D] (see [method get_world_2d]).
</constant>
<constant name="TEXTURE_FILTER_PARENT_NODE" value="0" enum="TextureFilter">
The [CanvasItem] will inherit the filter from its parent.
@ -739,25 +748,25 @@
The [CanvasItem] will inherit the filter from its parent.
</constant>
<constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat">
Texture will not repeat.
The texture does not repeat.
</constant>
<constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat">
Texture will repeat normally.
The texture repeats when exceeding the texture's size.
</constant>
<constant name="TEXTURE_REPEAT_MIRROR" value="3" enum="TextureRepeat">
Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored.
The texture repeats when the exceeding the texture's size in a "2×2 tiled mode". Repeated textures at even positions are mirrored.
</constant>
<constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat">
Represents the size of the [enum TextureRepeat] enum.
</constant>
<constant name="CLIP_CHILDREN_DISABLED" value="0" enum="ClipChildrenMode">
Child draws over parent and is not clipped.
Children are drawn over this node and are not clipped.
</constant>
<constant name="CLIP_CHILDREN_ONLY" value="1" enum="ClipChildrenMode">
Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn.
This node is used as a mask and is [b]not[/b] drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to this node's drawn area.
</constant>
<constant name="CLIP_CHILDREN_AND_DRAW" value="2" enum="ClipChildrenMode">
Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area.
This node is used as a mask and is also drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to the parent's drawn area.
</constant>
<constant name="CLIP_CHILDREN_MAX" value="3" enum="ClipChildrenMode">
Represents the size of the [enum ClipChildrenMode] enum.

View file

@ -7,7 +7,7 @@
[CanvasItem]-derived nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index [code]0[/code], so a [CanvasLayer] with index [code]-1[/code] will be drawn below, and a [CanvasLayer] with index [code]1[/code] will be drawn above. This order will hold regardless of the [member CanvasItem.z_index] of the nodes within each layer.
[CanvasLayer]s can be hidden and they can also optionally follow the viewport. This makes them useful for HUDs like health bar overlays (on layers [code]1[/code] and higher) or backgrounds (on layers [code]-1[/code] and lower).
[b]Note:[/b] Embedded [Window]s are placed on layer [code]1024[/code]. [CanvasItem]s on layers [code]1025[/code] and higher appear in front of embedded windows.
[b]Note:[/b] Each [CanvasLayer] is drawn on one specific [Viewport] and cannot be shared between multiple [Viewport]s, see [member custom_viewport]. When using multiple [Viewport]s, for example in a split-screen game, you need create an individual [CanvasLayer] for each [Viewport] you want it to be drawn on.
[b]Note:[/b] Each [CanvasLayer] is drawn on one specific [Viewport] and cannot be shared between multiple [Viewport]s, see [member custom_viewport]. When using multiple [Viewport]s, for example in a split-screen game, you need to create an individual [CanvasLayer] for each [Viewport] you want it to be drawn on.
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>

View file

@ -166,7 +166,7 @@
If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force.
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. Must be greater than zero.
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
@ -196,7 +196,7 @@
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
</member>
<member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799">
Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING].
Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING].
</member>
</members>
<constants>

View file

@ -157,7 +157,7 @@
If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force.
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="6">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. Must be greater than zero.
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0">
Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
@ -187,7 +187,7 @@
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
</member>
<member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799">
Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When [member motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if [member floor_block_on_wall] is [code]true[/code].
Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. When [member motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if [member floor_block_on_wall] is [code]true[/code].
</member>
</members>
<constants>

View file

@ -15,6 +15,12 @@
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
<theme_item name="checkbox_checked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the checked icon when the checkbox is pressed.
</theme_item>
<theme_item name="checkbox_unchecked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the unchecked icon when the checkbox is not pressed.
</theme_item>
<theme_item name="check_v_offset" data_type="constant" type="int" default="0">
The vertical offset used when rendering the check icons (in pixels).
</theme_item>

View file

@ -14,6 +14,12 @@
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
<theme_item name="button_checked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the checked icon when the checkbox is pressed.
</theme_item>
<theme_item name="button_unchecked_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the unchecked icon when the checkbox is not pressed.
</theme_item>
<theme_item name="check_v_offset" data_type="constant" type="int" default="0">
The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>

View file

@ -582,13 +582,13 @@
If [code]true[/code], lines can be folded. Otherwise, line folding methods like [method fold_line] will not work and [method can_fold_line] will always return [code]false[/code]. See [member gutters_draw_fold_gutter].
</member>
<member name="line_length_guidelines" type="int[]" setter="set_line_length_guidelines" getter="get_line_length_guidelines" default="[]">
Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently.
Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is drawn more prominently.
</member>
<member name="symbol_lookup_on_click" type="bool" setter="set_symbol_lookup_on_click_enabled" getter="is_symbol_lookup_on_click_enabled" default="false">
Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted.
</member>
<member name="symbol_tooltip_on_hover" type="bool" setter="set_symbol_tooltip_on_hover_enabled" getter="is_symbol_tooltip_on_hover_enabled" default="false">
Set when a word is hovered, the [signal symbol_hovered] should be emitted.
If [code]true[/code], the [signal symbol_hovered] signal is emitted when hovering over a word.
</member>
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" overrides="TextEdit" enum="Control.TextDirection" default="1" />
</members>
@ -596,7 +596,7 @@
<signal name="breakpoint_toggled">
<param index="0" name="line" type="int" />
<description>
Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
Emitted when a breakpoint is added or removed from a line. If the line is removed via backspace, a signal is emitted at the old line.
</description>
</signal>
<signal name="code_completion_requested">

View file

@ -6,6 +6,7 @@
<description>
A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 32-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.
Colors can be created in various ways: By the various [Color] constructors, by static methods such as [method from_hsv], and by using a name from the set of standardized colors based on [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the addition of [constant TRANSPARENT]. GDScript also provides [method @GDScript.Color8], which uses integers from [code]0[/code] to [code]255[/code] and doesn't support overbright colors.
Color data may be stored in many color spaces and encodings. The [method srgb_to_linear] and [method linear_to_srgb] methods can convert between nonlinear sRGB encoding and linear RGB encoding.
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it is equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
</description>
@ -364,12 +365,14 @@
<return type="Color" />
<description>
Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This method assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation.
[b]Note:[/b] The color's [member a]lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels.
</description>
</method>
<method name="srgb_to_linear" qualifiers="const">
<return type="Color" />
<description>
Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation.
[b]Note:[/b] The color's [member a]lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels.
</description>
</method>
<method name="to_abgr32" qualifiers="const">
@ -492,6 +495,7 @@
<members>
<member name="a" type="float" setter="" getter="" default="1.0">
The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
[b]Note:[/b] The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels. The [method linear_to_srgb] and [method srgb_to_linear] methods do not affect the alpha channel.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
Wrapper for [member a] that uses the range 0 to 255, instead of 0 to 1.

View file

@ -141,6 +141,9 @@
</constant>
</constants>
<theme_items>
<theme_item name="focused_not_editing_cursor_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.275)">
Color of rectangle or circle drawn when a picker shape part is focused but not editable via keyboard or joypad. Displayed [i]over[/i] the picker shape, so a partially transparent color should be used to ensure the picker shape remains visible.
</theme_item>
<theme_item name="center_slider_grabbers" data_type="constant" type="int" default="1">
Overrides the [theme_item Slider.center_grabber] theme property of the sliders.
</theme_item>
@ -204,5 +207,14 @@
<theme_item name="shape_rect_wheel" data_type="icon" type="Texture2D">
The icon for rectangular wheel picker shapes.
</theme_item>
<theme_item name="picker_focus_circle" data_type="style" type="StyleBox">
The [StyleBox] used when the circle-shaped part of the picker is focused. Displayed [i]over[/i] the picker shape, so a partially transparent [StyleBox] should be used to ensure the picker shape remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</theme_item>
<theme_item name="picker_focus_rectangle" data_type="style" type="StyleBox">
The [StyleBox] used when the rectangle-shaped part of the picker is focused. Displayed [i]over[/i] the picker shape, so a partially transparent [StyleBox] should be used to ensure the picker shape remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</theme_item>
<theme_item name="sample_focus" data_type="style" type="StyleBox">
The [StyleBox] used for the old color sample part when it is focused. Displayed [i]over[/i] the sample, so a partially transparent [StyleBox] should be used to ensure the picker shape remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</theme_item>
</theme_items>
</class>

View file

@ -24,6 +24,12 @@
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
<method name="_accessibility_get_contextual_info" qualifiers="virtual const">
<return type="String" />
<description>
Return the description of the keyboard shortcuts and other contextual help for this control.
</description>
</method>
<method name="_can_drop_data" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="at_position" type="Vector2" />
@ -31,6 +37,7 @@
<description>
Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control.
This method should only be used to test the data. Process the data in [method _drop_data].
[b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position.
[codeblocks]
[gdscript]
func _can_drop_data(position, data):
@ -55,6 +62,7 @@
<param index="1" name="data" type="Variant" />
<description>
Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control.
[b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position.
[codeblocks]
[gdscript]
func _can_drop_data(position, data):
@ -83,6 +91,7 @@
<description>
Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [param at_position] is local to this control. Drag may be forced with [method force_drag].
A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
[b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position.
[codeblocks]
[gdscript]
func _get_drag_data(position):
@ -223,6 +232,18 @@
[b]Note:[/b] This does not affect the methods in [Input], only the way events are propagated.
</description>
</method>
<method name="accessibility_drag">
<return type="void" />
<description>
Starts drag-and-drop operation without using a mouse.
</description>
</method>
<method name="accessibility_drop">
<return type="void" />
<description>
Ends drag-and-drop operation without using a mouse.
</description>
</method>
<method name="add_theme_color_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
@ -394,6 +415,12 @@
Returns [member offset_right] and [member offset_bottom].
</description>
</method>
<method name="get_focus_mode_with_recursive" qualifiers="const">
<return type="int" enum="Control.FocusMode" />
<description>
Similar to the getter of [member focus_mode], but takes parent's [member focus_recursive_behavior] into account.
</description>
</method>
<method name="get_focus_neighbor" qualifiers="const">
<return type="NodePath" />
<param index="0" name="side" type="int" enum="Side" />
@ -416,6 +443,12 @@
Returns the minimum size for this control. See [member custom_minimum_size].
</description>
</method>
<method name="get_mouse_filter_with_recursive" qualifiers="const">
<return type="int" enum="Control.MouseFilter" />
<description>
Similar to the getter of [member mouse_filter], but takes parent's [member mouse_recursive_behavior] into account.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="float" />
<param index="0" name="offset" type="int" enum="Side" />
@ -701,7 +734,7 @@
<method name="is_layout_rtl" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if layout is right-to-left. See also [member layout_direction].
Returns [code]true[/code] if the layout is right-to-left. See also [member layout_direction].
</description>
</method>
<method name="release_focus">
@ -973,6 +1006,9 @@
Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_prev] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="focus_recursive_behavior" type="int" setter="set_focus_recursive_behavior" getter="get_focus_recursive_behavior" enum="Control.RecursiveBehavior" default="0">
Controls whether the recursive child nodes should have their [member focus_mode] overridden to [constant FOCUS_NONE] when evaluating input.
</member>
<member name="global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
The node's global position, relative to the world (usually to the [CanvasLayer]).
</member>
@ -1001,6 +1037,9 @@
You should disable it on the root of your UI if you do not want scroll events to go to the [method Node._unhandled_input] processing.
[b]Note:[/b] Because this property defaults to [code]true[/code], this allows nested scrollable containers to work out of the box.
</member>
<member name="mouse_recursive_behavior" type="int" setter="set_mouse_recursive_behavior" getter="get_mouse_recursive_behavior" enum="Control.RecursiveBehavior" default="0">
Controls whether the recursive child nodes should have their [member mouse_filter] overridden to [constant MOUSE_FILTER_IGNORE] when evaluating input.
</member>
<member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
@ -1156,6 +1195,18 @@
<constant name="FOCUS_ALL" value="2" enum="FocusMode">
The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with [member focus_mode].
</constant>
<constant name="FOCUS_ACCESSIBILITY" value="3" enum="FocusMode">
The node can grab focus only when screen reader is active. Use with [member focus_mode].
</constant>
<constant name="RECURSIVE_BEHAVIOR_INHERITED" value="0" enum="RecursiveBehavior">
Inherits the associated behavior from the control's parent. This is the default for any newly created control.
</constant>
<constant name="RECURSIVE_BEHAVIOR_DISABLED" value="1" enum="RecursiveBehavior">
The current control and all its recursive child controls have their associated behavior disabled, regardless of the parent control's configuration.
</constant>
<constant name="RECURSIVE_BEHAVIOR_ENABLED" value="2" enum="RecursiveBehavior">
The current control and all its recursive child controls have their associated behavior enabled, regardless of the parent control's configuration.
</constant>
<constant name="NOTIFICATION_RESIZED" value="40">
Sent when the node changes size. Use [member size] to get the new size.
</constant>

View file

@ -477,7 +477,15 @@
<method name="sort">
<return type="void" />
<description>
Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the [method keys], getting the [method values], and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted.
Sorts the dictionary in ascending order, by key. The final order is dependent on the "less than" ([code]&lt;[/code]) comparison between keys.
[codeblocks]
[gdscript]
var numbers = { "c": 2, "a": 0, "b": 1 }
numbers.sort()
print(numbers) # Prints { "a": 0, "b": 1, "c": 2 }
[/gdscript]
[/codeblocks]
This method ensures that the dictionary's entries are ordered consistently when [method keys] or [method values] are called, or when the dictionary needs to be converted to a string through [method @GlobalScope.str] or [method JSON.stringify].
</description>
</method>
<method name="values" qualifiers="const">

View file

@ -248,6 +248,14 @@
[b]Note:[/b] This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns [code]true[/code].
</description>
</method>
<method name="is_equivalent" qualifiers="const">
<return type="bool" />
<param index="0" name="path_a" type="String" />
<param index="1" name="path_b" type="String" />
<description>
Returns [code]true[/code] if paths [param path_a] and [param path_b] resolve to the same file system object. Returns [code]false[/code] otherwise, even if the files are bit-for-bit identical (e.g., identical copies of the file that are not symbolic links).
</description>
</method>
<method name="is_link">
<return type="bool" />
<param index="0" name="path" type="String" />

File diff suppressed because it is too large Load diff

View file

@ -121,6 +121,7 @@
</method>
<method name="get_forced_export_files" qualifiers="static">
<return type="PackedStringArray" />
<param index="0" name="preset" type="EditorExportPreset" />
<description>
Returns array of core file names that always should be exported regardless of preset config.
</description>

View file

@ -241,6 +241,16 @@
Return [code]true[/code] if the plugin supports the given [param platform].
</description>
</method>
<method name="_update_android_prebuilt_manifest" qualifiers="virtual const">
<return type="PackedByteArray" />
<param index="0" name="platform" type="EditorExportPlatform" />
<param index="1" name="manifest_data" type="PackedByteArray" />
<description>
Provide access to the Android prebuilt manifest and allows the plugin to modify it if needed.
Implementers of this virtual method should take the binary manifest data from [param manifest_data], copy it, modify it, and then return it with the modifications.
If no modifications are needed, then an empty [PackedByteArray] should be returned.
</description>
</method>
<method name="add_file">
<return type="void" />
<param index="0" name="path" type="String" />

View file

@ -36,13 +36,13 @@
<method name="get_encrypt_directory" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code], PCK directory encryption is enabled in the export dialog.
Returns [code]true[/code] if PCK directory encryption is enabled in the export dialog.
</description>
</method>
<method name="get_encrypt_pck" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code], PCK encryption is enabled in the export dialog.
Returns [code]true[/code] if PCK encryption is enabled in the export dialog.
</description>
</method>
<method name="get_encryption_ex_filter" qualifiers="const">
@ -121,6 +121,13 @@
Returns export preset name.
</description>
</method>
<method name="get_project_setting">
<return type="Variant" />
<param index="0" name="name" type="StringName" />
<description>
Returns the value of the setting identified by [param name] using export preset feature tag overrides instead of current OS features.
</description>
</method>
<method name="get_script_export_mode" qualifiers="const">
<return type="int" />
<description>
@ -140,7 +147,7 @@
<return type="bool" />
<param index="0" name="property" type="StringName" />
<description>
Returns [code]true[/code] if preset has specified property.
Returns [code]true[/code] if the preset has the property named [param property].
</description>
</method>
<method name="has_export_file">

View file

@ -51,6 +51,7 @@
<members>
<member name="draw_focus_border" type="bool" setter="set_draw_focus_border" getter="get_draw_focus_border" overrides="ScrollContainer" default="true" />
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" overrides="ScrollContainer" default="true" />
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>

View file

@ -101,7 +101,7 @@
<return type="float" />
<description>
Returns the actual scale of the editor UI ([code]1.0[/code] being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins.
[b]Note:[/b] This value is set via the [code]interface/editor/display_scale[/code] and [code]interface/editor/custom_display_scale[/code] editor settings. Editor must be restarted for changes to be properly applied.
[b]Note:[/b] This value is set via the [member EditorSettings.interface/editor/display_scale] and [member EditorSettings.interface/editor/custom_display_scale] settings. The editor must be restarted for changes to be properly applied.
</description>
</method>
<method name="get_editor_settings" qualifiers="const">
@ -156,10 +156,16 @@
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_open_scene_roots" qualifiers="const">
<return type="Node[]" />
<description>
Returns an array with references to the root nodes of the currently opened scenes.
</description>
</method>
<method name="get_open_scenes" qualifiers="const">
<return type="PackedStringArray" />
<description>
Returns an [Array] with the file paths of the currently opened scenes.
Returns an array with the file paths of the currently opened scenes.
</description>
</method>
<method name="get_playing_scene" qualifiers="const">
@ -438,7 +444,7 @@
<return type="void" />
<param index="0" name="name" type="String" />
<description>
Sets the editor's current main screen to the one specified in [param name]. [param name] must match the title of the tab in question exactly (e.g. [code]2D[/code], [code]3D[/code], [code skip-lint]Script[/code], or [code]AssetLib[/code] for default tabs).
Sets the editor's current main screen to the one specified in [param name]. [param name] must match the title of the tab in question exactly (e.g. [code]2D[/code], [code]3D[/code], [code skip-lint]Script[/code], [code]Game[/code], or [code]AssetLib[/code] for default tabs).
</description>
</method>
<method name="set_plugin_enabled">

View file

@ -55,16 +55,16 @@
<return type="void" />
<param index="0" name="viewport_control" type="Control" />
<description>
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
Called by the engine when the 3D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
func _forward_3d_draw_over_viewport(overlay):
# Draw a circle at cursor position.
# Draw a circle at the cursor's position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
func _forward_3d_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
# Redraw the viewport when the cursor is moved.
update_overlays()
return EditorPlugin.AFTER_GUI_INPUT_STOP
return EditorPlugin.AFTER_GUI_INPUT_PASS
@ -72,7 +72,7 @@
[csharp]
public override void _Forward3DDrawOverViewport(Control viewportControl)
{
// Draw a circle at cursor position.
// Draw a circle at the cursor's position.
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
}
@ -80,7 +80,7 @@
{
if (@event is InputEventMouseMotion)
{
// Redraw viewport when cursor is moved.
// Redraw the viewport when the cursor is moved.
UpdateOverlays();
return EditorPlugin.AfterGuiInput.Stop;
}
@ -139,16 +139,16 @@
<return type="void" />
<param index="0" name="viewport_control" type="Control" />
<description>
Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
Called by the engine when the 2D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
func _forward_canvas_draw_over_viewport(overlay):
# Draw a circle at cursor position.
# Draw a circle at the cursor's position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
func _forward_canvas_gui_input(event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
# Redraw the viewport when the cursor is moved.
update_overlays()
return true
return false
@ -156,7 +156,7 @@
[csharp]
public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
{
// Draw a circle at cursor position.
// Draw a circle at the cursor's position.
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
}
@ -164,7 +164,7 @@
{
if (@event is InputEventMouseMotion)
{
// Redraw viewport when cursor is moved.
// Redraw the viewport when the cursor is moved.
UpdateOverlays();
return true;
}
@ -234,7 +234,7 @@
<return type="Texture2D" />
<description>
Override this method in your plugin to return a [Texture2D] in order to give it an icon.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
[codeblocks]
[gdscript]
@ -260,7 +260,7 @@
<return type="String" />
<description>
Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
</description>
</method>
<method name="_get_state" qualifiers="virtual const">
@ -329,7 +329,7 @@
<method name="_has_main_screen" qualifiers="virtual const">
<return type="bool" />
<description>
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b], [b]Game[/b], and [b]AssetLib[/b]).
When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_editor_main_screen] and made visible inside [method _make_visible].
Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance.
[codeblock]
@ -439,7 +439,7 @@
Adds the control to a specific dock slot (see [enum DockSlot] for options).
If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier.
Optionally, you can specify a shortcut parameter. When pressed, this shortcut will open and focus the dock.
</description>
</method>
<method name="add_custom_type">
@ -784,7 +784,7 @@
<signal name="main_screen_changed">
<param index="0" name="screen_name" type="String" />
<description>
Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins.
Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]Game[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins.
</description>
</signal>
<signal name="project_settings_changed" deprecated="Use [signal ProjectSettings.settings_changed] instead.">

View file

@ -118,6 +118,7 @@
<member name="draw_warning" type="bool" setter="set_draw_warning" getter="is_draw_warning" default="false">
Used by the inspector, set to [code]true[/code] when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
</member>

View file

@ -30,10 +30,17 @@
Returns the list of selected nodes.
</description>
</method>
<method name="get_transformable_selected_nodes">
<method name="get_top_selected_nodes">
<return type="Node[]" />
<description>
Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild.
Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.).
For example, if there is a node A with a child B and a sibling C, then selecting all three will cause this method to return only A and C. Changing the global transform of A will affect the global transform of B, so there is no need to change B separately.
</description>
</method>
<method name="get_transformable_selected_nodes" deprecated="Use [method get_top_selected_nodes] instead.">
<return type="Node[]" />
<description>
Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). See [method get_top_selected_nodes].
</description>
</method>
<method name="remove_node">

View file

@ -191,6 +191,10 @@
<member name="debugger/auto_switch_to_stack_trace" type="bool" setter="" getter="">
If [code]true[/code], automatically switches to the [b]Stack Trace[/b] panel when the debugger hits a breakpoint or steps.
</member>
<member name="debugger/max_node_selection" type="int" setter="" getter="">
The limit of how many remote nodes can be selected at once.
[b]Warning:[/b] Increasing this value is not recommended, as selecting too many can make the editing and inspection of remote properties unreliable.
</member>
<member name="debugger/profile_native_calls" type="bool" setter="" getter="">
If [code]true[/code], enables collection of profiling data from non-GDScript Godot functions, such as engine class methods. Enabling this slows execution while profiling further.
</member>
@ -229,6 +233,9 @@
<member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference.
</member>
<member name="docks/scene_tree/accessibility_warnings" type="bool" setter="" getter="">
If [code]true[/code], accessibility related warnings are displayed alongside other configuration warnings.
</member>
<member name="docks/scene_tree/ask_before_deleting_related_animation_tracks" type="bool" setter="" getter="">
If [code]true[/code], when a node is deleted with animation tracks referencing it, a confirmation dialog appears before the tracks are deleted. The dialog will appear even when using the "Delete (No Confirm)" shortcut.
</member>
@ -288,6 +295,10 @@
<member name="editors/2d/zoom_speed_factor" type="float" setter="" getter="">
The factor to use when zooming in or out in the 2D editor. For example, [code]1.1[/code] will zoom in by 10% with every step. If set to [code]2.0[/code], zooming will only cycle through powers of two.
</member>
<member name="editors/3d/active_selection_box_color" type="Color" setter="" getter="">
The color to use for the active selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity.
[b]Note:[/b] The term "active" indicates that this object is the primary selection used as the basis for certain operations. This is the last selected [Node3D], which can be reordered with [kbd]Shift + Left mouse button[/kbd].
</member>
<member name="editors/3d/default_fov" type="float" setter="" getter="">
The default camera vertical field of view to use in the 3D editor (in degrees). The camera field of view can be adjusted on a per-scene basis using the [b]View[/b] menu at the top of the 3D editor. If a scene had its camera field of view adjusted using the [b]View[/b] menu, this setting is ignored in the scene in question. This setting is also ignored while a [Camera3D] node is being previewed in the editor.
[b]Note:[/b] The editor camera always uses the [b]Keep Height[/b] aspect mode.
@ -514,12 +525,22 @@
If [code]true[/code], display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. Holding Shift will bypass the dialog.
If [code]false[/code], the behavior is reversed, i.e. the dialog only appears when Shift is held.
</member>
<member name="editors/animation/default_animation_step" type="float" setter="" getter="">
Default step used when creating a new [Animation] in the Animation bottom panel. Only affects the first animation created in the [AnimationPlayer]. By default, other newly created animations will use the step from the previous ones.
This value is always expressed in seconds. If you want e.g. [code]10[/code] FPS to be the default, you need to set the default step to [code]0.1[/code].
</member>
<member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
If [code]true[/code], create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly.
</member>
<member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
If [code]true[/code], create a [code]RESET[/code] track when creating a new animation track. This track can be used to restore the animation to a "default" state.
</member>
<member name="editors/animation/default_fps_compatibility" type="bool" setter="" getter="">
Controls whether [AnimationPlayer] will apply snapping to nearest integer FPS when snapping is in Seconds mode. The option is remembered locally for a scene and this option only determines the default value when scene doesn't have local state yet.
</member>
<member name="editors/animation/default_fps_mode" type="int" setter="" getter="">
Default step mode for [AnimationPlayer] (seconds or FPS). The option is remembered locally for a scene and this option only determines the default value when scene doesn't have local state yet.
</member>
<member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature.
</member>
@ -787,7 +808,7 @@
</member>
<member name="interface/editor/accept_dialog_cancel_ok_buttons" type="int" setter="" getter="">
How to position the Cancel and OK buttons in the editor's [AcceptDialog]s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one.
- [b]Auto[/b] follows the platform convention: Cancel first on macOS and Linux, OK first on Windows.
- [b]Auto[/b] follows the platform convention: OK first on Windows, KDE, and LXQt, Cancel first on macOS and other Linux desktop environments.
- [b]Cancel First[/b] forces the ordering Cancel/OK.
- [b]OK First[/b] forces the ordering OK/Cancel.
</member>
@ -829,7 +850,7 @@
Translations are provided by the community. If you spot a mistake, [url=$DOCS_URL/contributing/documentation/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url]
</member>
<member name="interface/editor/editor_screen" type="int" setter="" getter="">
The preferred monitor to display the editor. If [b]Auto[/b], the editor will remember the last screen it was displayed on across restarts.
The preferred monitor to display the editor. If [b]Auto[/b], the editor will remember the last screen it was displayed on across multiple sessions.
</member>
<member name="interface/editor/expand_to_title" type="bool" setter="" getter="">
Expanding main editor window content to the title, if supported by [DisplayServer]. See [constant DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE].
@ -890,7 +911,7 @@
If [code]true[/code], scenes and scripts are saved when the editor loses focus. Depending on the work flow, this behavior can be less intrusive than [member text_editor/behavior/files/autosave_interval_secs] or remembering to save manually.
</member>
<member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
If [code]true[/code], the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If [code]false[/code], the distraction-free mode toggle is shared between all tabs.
If [code]true[/code], the editor's Script tab will have a separate distraction mode setting from the 2D/3D/Game/AssetLib tabs. If [code]false[/code], the distraction-free mode toggle is shared between all tabs.
</member>
<member name="interface/editor/show_internal_errors_in_toast_notifications" type="int" setter="" getter="">
If enabled, displays internal engine errors in toast notifications (toggleable by clicking the "bell" icon at the bottom of the editor). No matter the value of this setting, non-internal engine errors will always be visible in toast notifications.
@ -909,6 +930,9 @@
[b]Note:[/b] To query whether the editor can use multiple windows in an editor plugin, use [method EditorInterface.is_multi_window_enabled] instead of querying the value of this editor setting.
[b]Note:[/b] If [code]true[/code], game embedding is disabled.
</member>
<member name="interface/editor/tablet_driver" type="int" setter="" getter="">
Overrides the tablet driver used by the editor.
</member>
<member name="interface/editor/ui_layout_direction" type="int" setter="" getter="">
Editor UI default layout direction.
</member>
@ -1081,6 +1105,10 @@
If [code]true[/code], enable two finger pan and scale gestures on touchscreen devices.
[b]Note:[/b] Defaults to [code]true[/code] on touchscreen devices.
</member>
<member name="interface/touchscreen/enable_touch_actions_panel" type="bool" setter="" getter="">
If [code]true[/code], enables the TouchActionsPanel to provide easy access to keyboard shortcuts on touchscreen devices.
[b]Note:[/b] Only available in the Android editor.
</member>
<member name="interface/touchscreen/increase_scrollbar_touch_area" type="bool" setter="" getter="">
If [code]true[/code], increases the scrollbar touch area to improve usability on touchscreen devices.
[b]Note:[/b] Defaults to [code]true[/code] on touchscreen devices.
@ -1165,7 +1193,7 @@
</member>
<member name="run/window_placement/rect" type="int" setter="" getter="">
The window mode to use to display the project when starting the project from the editor.
[b]Note:[/b] Game embedding is not available for "Force Maximized" or "Force Fullscreen."
[b]Note:[/b] Game embedding is not available for [b]"Force Maximized"[/b] or [b]"Force Fullscreen"[/b].
</member>
<member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if [member run/window_placement/rect] is set to [b]Custom Position[/b].
@ -1248,6 +1276,10 @@
<member name="text_editor/behavior/files/convert_indent_on_save" type="bool" setter="" getter="">
If [code]true[/code], converts indentation to match the script editor's indentation settings when saving a script. See also [member text_editor/behavior/indent/type].
</member>
<member name="text_editor/behavior/files/drop_preload_resources_as_uid" type="bool" setter="" getter="">
If [code]true[/code], when dropping a [Resource] file to script editor while [kbd]Ctrl[/kbd] is held, the resource will be preloaded with a UID. If [code]false[/code], the resource will be preloaded with a path.
When you hold [kbd]Ctrl+Shift[/kbd], the behavior is reversed.
</member>
<member name="text_editor/behavior/files/open_dominant_script_on_scene_change" type="bool" setter="" getter="">
If [code]true[/code], opening a scene automatically opens the script attached to the root node, or the topmost node if the root has no script.
</member>
@ -1517,6 +1549,9 @@
<member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
The script editor's color for user-defined types (using [code]class_name[/code]).
</member>
<member name="text_editor/theme/highlighting/warning_color" type="Color" setter="" getter="">
The script editor's background color for lines with warnings. This should be set to a translucent color so that it can display on top of other line color modifiers such as [member text_editor/theme/highlighting/current_line_color].
</member>
<member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
The script editor's color for words highlighted by selecting them. Only visible if [member text_editor/appearance/caret/highlight_all_occurrences] is [code]true[/code].
</member>

View file

@ -5,7 +5,7 @@
</brief_description>
<description>
This class can be used to permanently store data in the user device's file system and to read from it. This is useful for storing game save data or player configuration files.
Here's a sample on how to write and read from a file:
[b]Example:[/b] How to write and read from a file. The file named [code]"save_game.dat"[/code] will be stored in the user data folder, as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation:
[codeblocks]
[gdscript]
func save_to_file(content):
@ -32,10 +32,9 @@
}
[/csharp]
[/codeblocks]
In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation.
[FileAccess] will close when it's freed, which happens when it goes out of scope or when it gets assigned with [code]null[/code]. [method close] can be used to close it before then explicitly. In C# the reference must be disposed manually, which can be done with the [code]using[/code] statement or by calling the [code]Dispose[/code] method directly.
A [FileAccess] instance will close its file when the instance is freed. Since it inherits [RefCounted], this happens automatically when it is no longer in use. [method close] can be called to close it earlier. In C#, the reference must be disposed manually, which can be done with the [code]using[/code] statement or by calling the [code]Dispose[/code] method directly.
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of [FileAccess], as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. If using [FileAccess], make sure the file is included in the export by changing its import mode to [b]Keep File (exported as is)[/b] in the Import dock, or, for files where this option is not available, change the non-resource export filter in the Export dialog to include the file's extension (e.g. [code]*.txt[/code]).
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [kbd]Alt + F4[/kbd]). If you stop the project execution by pressing [kbd]F8[/kbd] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
<link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
@ -123,6 +122,13 @@
Returns the next 64 bits from the file as an integer. See [method store_64] for details on what values can be stored and retrieved this way.
</description>
</method>
<method name="get_access_time" qualifiers="static">
<return type="int" />
<param index="0" name="file" type="String" />
<description>
Returns the last time the [param file] was accessed in Unix timestamp format, or [code]0[/code] on error. This Unix timestamp can be converted to another format using the [Time] singleton.
</description>
</method>
<method name="get_as_text" qualifiers="const">
<return type="String" />
<param index="0" name="skip_cr" type="bool" default="false" />
@ -280,6 +286,13 @@
Returns an SHA-256 [String] representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_size" qualifiers="static">
<return type="int" />
<param index="0" name="file" type="String" />
<description>
Returns file size in bytes, or [code]-1[/code] on error.
</description>
</method>
<method name="get_unix_permissions" qualifiers="static">
<return type="int" enum="FileAccess.UnixPermissionFlags" is_bitfield="true" />
<param index="0" name="file" type="String" />
@ -555,8 +568,7 @@
<members>
<member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian">
If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness.
[b]Note:[/b] [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
[b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member big_endian] [i]after[/i] opening the file, not before.
[b]Note:[/b] This is always reset to system endianness, which is little-endian on all supported platforms, whenever you open the file. Therefore, you must set [member big_endian] [i]after[/i] opening the file, not before.
</member>
</members>
<constants>

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FoldableContainer" inherits="Container" keywords="expandable, collapsible, collapse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A container that can be expanded/collapsed.
</brief_description>
<description>
A container that can be expanded/collapsed, with a title that can be filled with controls, such as buttons.
The title can be positioned at the top or bottom of the container.
The container can be expanded or collapsed by clicking the title or by pressing [code]ui_accept[/code] when focused.
Child control nodes are hidden when the container is collapsed. Ignores non-control children.
Can allow grouping with other FoldableContainers, check [member foldable_group] and [FoldableGroup].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_title_bar_control">
<return type="void" />
<param index="0" name="control" type="Control" />
<description>
Adds a [Control] that will be placed next to the container's title, obscuring the clickable area. Prime usage is adding [Button] nodes, but it can be any [Control].
The control will be added as a child of this container and removed from previous parent if necessary. The controls will be placed aligned to the right, with the first added control being the leftmost one.
</description>
</method>
<method name="expand">
<return type="void" />
<description>
Expands the container and emits [signal folding_changed].
</description>
</method>
<method name="fold">
<return type="void" />
<description>
Folds the container and emits [signal folding_changed].
</description>
</method>
<method name="remove_title_bar_control">
<return type="void" />
<param index="0" name="control" type="Control" />
<description>
Removes a [Control] added with [method add_title_bar_control]. The node is not freed automatically, you need to use [method Node.queue_free].
</description>
</method>
</methods>
<members>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="foldable_group" type="FoldableGroup" setter="set_foldable_group" getter="get_foldable_group">
The [FoldableGroup] associated with the container.
</member>
<member name="folded" type="bool" setter="set_folded" getter="is_folded" default="false">
If [code]true[/code], the container will becomes folded and will hide all its children.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for text shaping algorithms. If left empty, current locale is used instead.
</member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The Container's title text.
</member>
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
<member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
Defines the behavior of the [FoldableContainer] when the text is longer than the available space.
</member>
<member name="title_alignment" type="int" setter="set_title_alignment" getter="get_title_alignment" enum="HorizontalAlignment" default="0">
Title's horizontal text alignment as defined in the [enum HorizontalAlignment] enum.
</member>
<member name="title_position" type="int" setter="set_title_position" getter="get_title_position" enum="FoldableContainer.TitlePosition" default="0">
Title's position as defined in the [enum TitlePosition] enum.
</member>
</members>
<signals>
<signal name="folding_changed">
<param index="0" name="is_folded" type="bool" />
<description>
Emitted when the container is folded/expanded.
</description>
</signal>
</signals>
<constants>
<constant name="POSITION_TOP" value="0" enum="TitlePosition">
Makes the title appear at the top of the container.
</constant>
<constant name="POSITION_BOTTOM" value="1" enum="TitlePosition">
Makes the title appear at the bottom of the container. Also makes all StyleBoxes flipped vertically.
</constant>
</constants>
<theme_items>
<theme_item name="collapsed_font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The title's font color when collapsed.
</theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The title's font color when expanded.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The title's font outline color.
</theme_item>
<theme_item name="hover_font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The title's font hover color.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="2">
The horizontal separation between the title's icon and text, and between title bar controls.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The title's font outline size.
</theme_item>
<theme_item name="font" data_type="font" type="Font">
The title's font.
</theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
The title's font size.
</theme_item>
<theme_item name="expanded_arrow" data_type="icon" type="Texture2D">
The title's icon used when expanded.
</theme_item>
<theme_item name="expanded_arrow_mirrored" data_type="icon" type="Texture2D">
The title's icon used when expanded (for bottom title).
</theme_item>
<theme_item name="folded_arrow" data_type="icon" type="Texture2D">
The title's icon used when folded (for left-to-right layouts).
</theme_item>
<theme_item name="folded_arrow_mirrored" data_type="icon" type="Texture2D">
The title's icon used when collapsed (for right-to-left layouts).
</theme_item>
<theme_item name="focus" data_type="style" type="StyleBox">
Background used when [FoldableContainer] has GUI focus. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</theme_item>
<theme_item name="panel" data_type="style" type="StyleBox">
Default background for the [FoldableContainer].
</theme_item>
<theme_item name="title_collapsed_hover_panel" data_type="style" type="StyleBox">
Background used when the mouse cursor enters the title's area when collapsed.
</theme_item>
<theme_item name="title_collapsed_panel" data_type="style" type="StyleBox">
Default background for the [FoldableContainer]'s title when collapsed.
</theme_item>
<theme_item name="title_hover_panel" data_type="style" type="StyleBox">
Background used when the mouse cursor enters the title's area when expanded.
</theme_item>
<theme_item name="title_panel" data_type="style" type="StyleBox">
Default background for the [FoldableContainer]'s title when expanded.
</theme_item>
</theme_items>
</class>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FoldableGroup" inherits="Resource" keywords="expandable, collapsible, collapse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A group of foldable containers that doesn't allow more than one container to be expanded at a time.
</brief_description>
<description>
A group of [FoldableContainer]-derived nodes. Only one container can be expanded at a time.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_containers" qualifiers="const">
<return type="FoldableContainer[]" />
<description>
Returns an [Array] of [FoldableContainer]s that have this as their FoldableGroup (see [member FoldableContainer.foldable_group]). This is equivalent to [ButtonGroup] but for FoldableContainers.
</description>
</method>
<method name="get_expanded_container" qualifiers="const">
<return type="FoldableContainer" />
<description>
Returns the current expanded container.
</description>
</method>
</methods>
<members>
<member name="allow_folding_all" type="bool" setter="set_allow_folding_all" getter="is_allow_folding_all" default="false">
If [code]true[/code], it is possible to fold all containers in this FoldableGroup.
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<signals>
<signal name="expanded">
<param index="0" name="container" type="FoldableContainer" />
<description>
Emitted when one of the containers of the group is expanded.
</description>
</signal>
</signals>
</class>

View file

@ -634,6 +634,9 @@
<member name="keep_rounding_remainders" type="bool" setter="set_keep_rounding_remainders" getter="get_keep_rounding_remainders" default="true">
If set to [code]true[/code], when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.
</member>
<member name="modulate_color_glyphs" type="bool" setter="set_modulate_color_glyphs" getter="is_modulate_color_glyphs" default="false">
If set to [code]true[/code], color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.
</member>
<member name="msdf_pixel_range" type="int" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="16">
The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, [member msdf_pixel_range] must be set to at least [i]twice[/i] the size of the largest font outline. The default [member msdf_pixel_range] value of [code]16[/code] allows outline sizes up to [code]8[/code] to look correct.
</member>

View file

@ -208,6 +208,23 @@
Returns the points which would make up a connection between [param from_node] and [param to_node].
</description>
</method>
<method name="get_connection_list_from_node" qualifiers="const">
<return type="Dictionary[]" />
<param index="0" name="node" type="StringName" />
<description>
Returns an [Array] containing a list of all connections for [param node].
A connection is represented as a [Dictionary] in the form of:
[codeblock]
{
from_node: StringName,
from_port: int,
to_node: StringName,
to_port: int,
keep_alive: bool
}
[/codeblock]
</description>
</method>
<method name="get_connections_intersecting_with_rect" qualifiers="const">
<return type="Dictionary[]" />
<param index="0" name="rect" type="Rect2" />
@ -374,6 +391,9 @@
<member name="snapping_enabled" type="bool" setter="set_snapping_enabled" getter="is_snapping_enabled" default="true">
If [code]true[/code], enables snapping.
</member>
<member name="type_names" type="Dictionary" setter="set_type_names" getter="get_type_names" default="{}">
[Dictionary] of human readable port type names.
</member>
<member name="zoom" type="float" setter="set_zoom" getter="get_zoom" default="1.0">
The current zoom value.
</member>
@ -586,5 +606,8 @@
<theme_item name="panel" data_type="style" type="StyleBox">
The background drawn under the grid.
</theme_item>
<theme_item name="panel_focus" data_type="style" type="StyleBox">
[StyleBox] used when the [GraphEdit] is focused (when used with assistive apps).
</theme_item>
</theme_items>
</class>

View file

@ -267,6 +267,7 @@
</method>
</methods>
<members>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="ignore_invalid_connection_type" type="bool" setter="set_ignore_invalid_connection_type" getter="is_ignoring_valid_connection_type" default="false">
If [code]true[/code], you can connect ports with different types, even if the connection was not explicitly allowed in the parent [GraphEdit].
</member>
@ -299,12 +300,18 @@
<theme_item name="panel" data_type="style" type="StyleBox">
The default background for the slot area of the [GraphNode].
</theme_item>
<theme_item name="panel_focus" data_type="style" type="StyleBox">
[StyleBox] used when the [GraphNode] is focused (when used with assistive apps).
</theme_item>
<theme_item name="panel_selected" data_type="style" type="StyleBox">
The [StyleBox] used for the slot area when selected.
</theme_item>
<theme_item name="slot" data_type="style" type="StyleBox">
The [StyleBox] used for each slot of the [GraphNode].
</theme_item>
<theme_item name="slot_selected" data_type="style" type="StyleBox">
[StyleBox] used when the slot is focused (when used with assistive apps).
</theme_item>
<theme_item name="titlebar" data_type="style" type="StyleBox">
The [StyleBox] used for the title bar of the [GraphNode].
</theme_item>

View file

@ -346,6 +346,14 @@
[b]Note:[/b] This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the [code]module_bmp_enabled=no[/code] SCons option.
</description>
</method>
<method name="load_dds_from_buffer">
<return type="int" enum="Error" />
<param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a DDS file.
[b]Note:[/b] This method is only available in engine builds with the DDS module enabled. By default, the DDS module is enabled, but it can be disabled at build-time using the [code]module_dds_enabled=no[/code] SCons option.
</description>
</method>
<method name="load_from_file" qualifiers="static">
<return type="Image" />
<param index="0" name="path" type="String" />
@ -458,6 +466,21 @@
Rotates the image by [code]180[/code] degrees. The width and height of the image must be greater than [code]1[/code].
</description>
</method>
<method name="save_dds" qualifiers="const">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
Saves the image as a DDS (DirectDraw Surface) file to [param path]. DDS is a container format that can store textures in various compression formats, such as DXT1, DXT5, or BC7. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the DDS module.
[b]Note:[/b] The DDS module may be disabled in certain builds, which means [method save_dds] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.
</description>
</method>
<method name="save_dds_to_buffer" qualifiers="const">
<return type="PackedByteArray" />
<description>
Saves the image as a DDS (DirectDraw Surface) file to a byte array. DDS is a container format that can store textures in various compression formats, such as DXT1, DXT5, or BC7. This function will return an empty byte array if Godot was compiled without the DDS module.
[b]Note:[/b] The DDS module may be disabled in certain builds, which means [method save_dds_to_buffer] will return an empty byte array when it is called from an exported project.
</description>
</method>
<method name="save_exr" qualifiers="const">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />

View file

@ -90,6 +90,13 @@
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="get_action_description" qualifiers="const">
<return type="String" />
<param index="0" name="action" type="StringName" />
<description>
Returns the human-readable description of the given action.
</description>
</method>
<method name="get_actions">
<return type="StringName[]" />
<description>

View file

@ -69,11 +69,14 @@
<description>
</description>
</method>
<method name="set_scope">
<method name="set_method">
<return type="void" />
<param index="0" name="scope" type="String" />
<param index="1" name="target" type="Object" />
<param index="0" name="name" type="String" />
<param index="1" name="callback" type="Callable" />
<description>
Registers a callback for the given method name.
- [param name] The name that clients can use to access the callback.
- [param callback] The callback which will handle the specific method.
</description>
</method>
</methods>

View file

@ -32,6 +32,7 @@
<param index="0" name="name" type="String" />
<description>
Wraps a class defined in Java, and returns it as a [JavaClass] [Object] type that Godot can interact with.
When wrapping inner (nested) classes, use [code]$[/code] instead of [code].[/code] to separate them. For example, [code]JavaClassWrapper.wrap("android.view.WindowManager$LayoutParams")[/code] wraps the [b]WindowManager.LayoutParams[/b] class.
[b]Note:[/b] This method only works on Android. On every other platform, this method does nothing and returns an empty [JavaClass].
</description>
</method>

View file

@ -49,12 +49,16 @@
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="autowrap_trim_flags" type="int" setter="set_autowrap_trim_flags" getter="get_autowrap_trim_flags" enum="TextServer.LineBreakFlag" is_bitfield="true" default="192">
Autowrap space trimming flags. See [constant TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
</member>
<member name="ellipsis_char" type="String" setter="set_ellipsis_char" getter="get_ellipsis_char" default="&quot;…&quot;">
Ellipsis character used for text clipping.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
@ -150,6 +154,9 @@
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [Label]'s text.
</theme_item>
<theme_item name="focus" data_type="style" type="StyleBox">
[StyleBox] used when the [Label] is focused (when used with assistive apps).
</theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Background [StyleBox] for the [Label].
</theme_item>

View file

@ -51,6 +51,9 @@
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="autowrap_trim_flags" type="int" setter="set_autowrap_trim_flags" getter="get_autowrap_trim_flags" enum="TextServer.LineBreakFlag" is_bitfield="true" default="192">
Autowrap space trimming flags. See [constant TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info.
</member>
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values.
</member>
@ -59,7 +62,7 @@
If [code]true[/code], text can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
</member>
<member name="fixed_size" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
If [code]true[/code], the label is rendered at the same size regardless of distance.
If [code]true[/code], the label is rendered at the same size regardless of distance. The label's size on screen is the same as if the camera was [code]1.0[/code] units away from the label's origin, regardless of the actual distance from the camera. The [Camera3D]'s field of view (or [member Camera3D.size] when in orthogonal/frustum mode) still affects the size the label is drawn at.
</member>
<member name="font" type="Font" setter="set_font" getter="get_font">
Font configuration used to display text.

View file

@ -64,7 +64,7 @@
[b]Note:[/b] Meshes' global illumination mode will also affect the global illumination rendering. See [member GeometryInstance3D.gi_mode].
</member>
<member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
The light's color in the nonlinear sRGB color space. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
</member>
<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
The light will affect objects in the selected layers.

View file

@ -9,6 +9,10 @@
- To enter edit mode, click on the control with the mouse, see also [member keep_editing_on_text_submit].
- To exit edit mode, press [code]ui_text_submit[/code] or [code]ui_cancel[/code] (by default [kbd]Escape[/kbd]) actions.
- Check [method edit], [method unedit], [method is_editing], and [signal editing_toggled] for more information.
While entering text, it is possible to insert special characters using Unicode, OEM or Windows alt codes:
- To enter Unicode codepoints, hold [kbd]Alt[/kbd] and type the codepoint on the numpad. For example, to enter the character [code]á[/code] (U+00E1), hold [kbd]Alt[/kbd] and type [kbd]+E1[/kbd] on the numpad (the leading zeroes can be omitted).
- To enter OEM codepoints, hold [kbd]Alt[/kbd] and type the code on the numpad. For example, to enter the character [code]á[/code] (OEM 160), hold [kbd]Alt[/kbd] and type [code]160[/code] on the numpad.
- To enter Windows codepoints, hold [kbd]Alt[/kbd] and type the code on the numpad. For example, to enter the character [code]á[/code] (Windows 0225), hold [kbd]Alt[/kbd] and type [kbd]0[/kbd], [kbd]2[/kbd], [kbd]2[/kbd], [kbd]5[/kbd] on the numpad. The leading zero here must [b]not[/b] be omitted, as this is how Windows codepoints are distinguished from OEM codepoints.
[b]Important:[/b]
- Focusing the [LineEdit] with [code]ui_focus_next[/code] (by default [kbd]Tab[/kbd]) or [code]ui_focus_prev[/code] (by default [kbd]Shift + Tab[/kbd]) or [method Control.grab_focus] still enters edit mode (for compatibility).
[LineEdit] features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
@ -252,7 +256,7 @@
The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it.
</member>
<member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false">
If [code]true[/code], the [LineEdit] will always show the caret, even if focus is lost.
If [code]true[/code], the [LineEdit] will always show the caret, even if not editing or focus is lost.
</member>
<member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
Allow moving caret, selecting and removing the individual composite character components.

View file

@ -10,7 +10,7 @@
<tutorials>
</tutorials>
<members>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>

View file

@ -19,7 +19,7 @@
<method name="is_interpolating" qualifiers="const">
<return type="bool" />
<description>
Returns whether the time-based interpolation is running or not. If [code]true[/code], it is equivalent to [method get_interpolation_remaining] being [code]0[/code].
Returns [code]true[/code] if time-based interpolation is running. If [code]true[/code], it is equivalent to [method get_interpolation_remaining] returning [code]0.0[/code].
This is useful to determine whether a [LookAtModifier3D] can be removed safely.
</description>
</method>

View file

@ -56,7 +56,7 @@
[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority">
Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] [code]1[/code] will render before all objects with [member render_priority] [code]0[/code].
Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] [code]1[/code] will render on top of all objects with [member render_priority] [code]0[/code].
[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
[b]Note:[/b] This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes.
</member>

View file

@ -100,6 +100,7 @@
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
Flat [MenuBar] don't display item decoration.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>

View file

@ -34,7 +34,7 @@
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
<member name="flat" type="bool" setter="set_flat" getter="is_flat" overrides="Button" default="true" />
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items currently in the list.
</member>

View file

@ -359,7 +359,7 @@
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true">
Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
Flag used to mark that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
</constant>
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true">
Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length.

View file

@ -18,10 +18,12 @@
# Just passthrough base signals (copied to var to avoid cyclic reference)
var cts = connected_to_server
var cf = connection_failed
var sd = server_disconnected
var pc = peer_connected
var pd = peer_disconnected
base_multiplayer.connected_to_server.connect(func(): cts.emit())
base_multiplayer.connection_failed.connect(func(): cf.emit())
base_multiplayer.server_disconnected.connect(func(): sd.emit())
base_multiplayer.peer_connected.connect(func(id): pc.emit(id))
base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id))
@ -59,6 +61,9 @@
func _get_unique_id() -&gt; int:
return base_multiplayer.get_unique_id()
func _get_remote_sender_id() -&gt; int:
return base_multiplayer.get_remote_sender_id()
func _get_peer_ids() -&gt; PackedInt32Array:
return base_multiplayer.get_peers()
[/gdscript]

View file

@ -374,7 +374,7 @@
<param index="0" name="rid" type="RID" />
<description>
Returns global menu open callback.
b]Note:[/b] This method is implemented only on macOS.
[b]Note:[/b] This method is implemented only on macOS.
</description>
</method>
<method name="get_size" qualifiers="const">

View file

@ -10,6 +10,14 @@
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link>
</tutorials>
<members>
<member name="excluded_regions" type="RID[]" setter="set_excluded_regions" getter="get_excluded_regions" default="[]">
The list of region [RID]s that will be excluded from the path query. Use [method NavigationRegion2D.get_rid] to get the [RID] associated with a [NavigationRegion2D] node.
[b]Note:[/b] The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
</member>
<member name="included_regions" type="RID[]" setter="set_included_regions" getter="get_included_regions" default="[]">
The list of region [RID]s that will be included by the path query. Use [method NavigationRegion2D.get_rid] to get the [RID] associated with a [NavigationRegion2D] node. If left empty all regions are included. If a region ends up being both included and excluded at the same time it will be excluded.
[b]Note:[/b] The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
</member>
<member name="map" type="RID" setter="set_map" getter="get_map" default="RID()">
The navigation map [RID] used in the path query.
</member>

View file

@ -10,6 +10,14 @@
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link>
</tutorials>
<members>
<member name="excluded_regions" type="RID[]" setter="set_excluded_regions" getter="get_excluded_regions" default="[]">
The list of region [RID]s that will be excluded from the path query. Use [method NavigationRegion3D.get_rid] to get the [RID] associated with a [NavigationRegion3D] node.
[b]Note:[/b] The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
</member>
<member name="included_regions" type="RID[]" setter="set_included_regions" getter="get_included_regions" default="[]">
The list of region [RID]s that will be included by the path query. Use [method NavigationRegion3D.get_rid] to get the [RID] associated with a [NavigationRegion3D] node. If left empty all regions are included. If a region ends up being both included and excluded at the same time it will be excluded.
[b]Note:[/b] The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
</member>
<member name="map" type="RID" setter="set_map" getter="get_map" default="RID()">
The navigation map [RID] used in the path query.
</member>

View file

@ -303,6 +303,13 @@
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
</method>
<method name="get_process_info" qualifiers="const">
<return type="int" />
<param index="0" name="process_info" type="int" enum="NavigationServer2D.ProcessInfo" />
<description>
Returns information about the current state of the NavigationServer. See [enum ProcessInfo] for a list of available states.
</description>
</method>
<method name="is_baking_navigation_polygon" qualifiers="const">
<return type="bool" />
<param index="0" name="navigation_polygon" type="NavigationPolygon" />
@ -457,7 +464,7 @@
Create a new map.
</description>
</method>
<method name="map_force_update">
<method name="map_force_update" deprecated="This method is no longer supported, as it is incompatible with asynchronous updates. It can only be used in a single-threaded context, at your own risk.">
<return type="void" />
<param index="0" name="map" type="RID" />
<description>
@ -971,6 +978,13 @@
If [param enabled] is [code]true[/code], the navigation [param region] will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
</description>
</method>
<method name="set_active">
<return type="void" />
<param index="0" name="active" type="bool" />
<description>
Control activation of this server.
</description>
</method>
<method name="set_debug_enabled">
<return type="void" />
<param index="0" name="enabled" type="bool" />
@ -1006,6 +1020,11 @@
</method>
</methods>
<signals>
<signal name="avoidance_debug_changed">
<description>
Emitted when avoidance debug settings are changed. Only available in debug builds.
</description>
</signal>
<signal name="map_changed">
<param index="0" name="map" type="RID" />
<description>
@ -1018,4 +1037,36 @@
</description>
</signal>
</signals>
<constants>
<constant name="INFO_ACTIVE_MAPS" value="0" enum="ProcessInfo">
Constant to get the number of active navigation maps.
</constant>
<constant name="INFO_REGION_COUNT" value="1" enum="ProcessInfo">
Constant to get the number of active navigation regions.
</constant>
<constant name="INFO_AGENT_COUNT" value="2" enum="ProcessInfo">
Constant to get the number of active navigation agents processing avoidance.
</constant>
<constant name="INFO_LINK_COUNT" value="3" enum="ProcessInfo">
Constant to get the number of active navigation links.
</constant>
<constant name="INFO_POLYGON_COUNT" value="4" enum="ProcessInfo">
Constant to get the number of navigation mesh polygons.
</constant>
<constant name="INFO_EDGE_COUNT" value="5" enum="ProcessInfo">
Constant to get the number of navigation mesh polygon edges.
</constant>
<constant name="INFO_EDGE_MERGE_COUNT" value="6" enum="ProcessInfo">
Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap.
</constant>
<constant name="INFO_EDGE_CONNECTION_COUNT" value="7" enum="ProcessInfo">
Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity.
</constant>
<constant name="INFO_EDGE_FREE_COUNT" value="8" enum="ProcessInfo">
Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links.
</constant>
<constant name="INFO_OBSTACLE_COUNT" value="9" enum="ProcessInfo">
Constant to get the number of active navigation obstacles.
</constant>
</constants>
</class>

View file

@ -496,7 +496,7 @@
Create a new map.
</description>
</method>
<method name="map_force_update">
<method name="map_force_update" deprecated="This method is no longer supported, as it is incompatible with asynchronous updates. It can only be used in a single-threaded context, at your own risk.">
<return type="void" />
<param index="0" name="map" type="RID" />
<description>

View file

@ -36,6 +36,20 @@
Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited].
</description>
</method>
<method name="_get_accessibility_configuration_warnings" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script, and accessibility warnings are enabled in the editor settings.
Returning an empty array produces no warnings.
</description>
</method>
<method name="_get_accessibility_container_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="node" type="Node" />
<description>
Return a human-readable description of the position of [param node] child in the custom container, added to the node name.
</description>
</method>
<method name="_get_configuration_warnings" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
@ -56,6 +70,12 @@
[/codeblock]
</description>
</method>
<method name="_get_focused_accessibility_element" qualifiers="virtual const">
<return type="RID" />
<description>
Called during accessibility information updates to determine the currently focused sub-element, should return a sub-element RID or the value returned by [method get_accessibility_element].
</description>
</method>
<method name="_input" qualifiers="virtual">
<return type="void" />
<param index="0" name="event" type="InputEvent" />
@ -142,7 +162,7 @@
<description>
Adds a child [param node]. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
If [param force_readable_name] is [code]true[/code], improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations.
If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. These nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code]. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. These nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code]. It also prevents these nodes being duplicated with their parent. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
[b]Note:[/b] If [param node] already has a parent, this method will fail. Use [method remove_child] first to remove [param node] from its current parent. For example:
[codeblocks]
[gdscript]
@ -259,7 +279,7 @@
<return type="Node" />
<param index="0" name="flags" type="int" default="15" />
<description>
Duplicates the node, returning a new node with all of its properties, signals, groups, and children copied from the original. The behavior can be tweaked through the [param flags] (see [enum DuplicateFlags]).
Duplicates the node, returning a new node with all of its properties, signals, groups, and children copied from the original. The behavior can be tweaked through the [param flags] (see [enum DuplicateFlags]). Internal nodes are not duplicated.
[b]Note:[/b] For nodes with a [Script] attached, if [method Object._init] has been defined with required parameters, the duplicated node will not have a [Script].
</description>
</method>
@ -299,6 +319,13 @@
[b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use [method get_node] with unique names (see [member unique_name_in_owner]).
</description>
</method>
<method name="get_accessibility_element" qualifiers="const">
<return type="RID" />
<description>
Returns main accessibility element RID.
[b]Note:[/b] This method should be called only during accessibility information updates ([constant NOTIFICATION_ACCESSIBILITY_UPDATE]).
</description>
</method>
<method name="get_child" qualifiers="const">
<return type="Node" />
<param index="0" name="idx" type="int" />
@ -777,6 +804,12 @@
Calls [method Object.notification] with [param what] on this node and all of its children, recursively.
</description>
</method>
<method name="queue_accessibility_update">
<return type="void" />
<description>
Queues an accessibility information update for this node.
</description>
</method>
<method name="queue_free" keywords="delete, remove, kill, die">
<return type="void" />
<description>
@ -994,6 +1027,27 @@
</method>
</methods>
<members>
<member name="accessibility_controls_nodes" type="NodePath[]" setter="set_accessibility_controls_nodes" getter="get_accessibility_controls_nodes" default="[]">
The list of nodes which are controlled by this node.
</member>
<member name="accessibility_described_by_nodes" type="NodePath[]" setter="set_accessibility_described_by_nodes" getter="get_accessibility_described_by_nodes" default="[]">
The list of nodes which are describing this node.
</member>
<member name="accessibility_description" type="String" setter="set_accessibility_description" getter="get_accessibility_description" default="&quot;&quot;">
The human-readable node description that is reported to assistive apps.
</member>
<member name="accessibility_flow_to_nodes" type="NodePath[]" setter="set_accessibility_flow_to_nodes" getter="get_accessibility_flow_to_nodes" default="[]">
The list of nodes which this node flows into.
</member>
<member name="accessibility_labeled_by_nodes" type="NodePath[]" setter="set_accessibility_labeled_by_nodes" getter="get_accessibility_labeled_by_nodes" default="[]">
The list of nodes which label this node.
</member>
<member name="accessibility_live" type="int" setter="set_accessibility_live" getter="get_accessibility_live" enum="DisplayServer.AccessibilityLiveMode" default="0">
Live region update mode, a live region is [Node] that is updated as a result of an external event when user focus may be elsewhere.
</member>
<member name="accessibility_name" type="String" setter="set_accessibility_name" getter="get_accessibility_name" default="&quot;&quot;">
The human-readable node name that is reported to assistive apps.
</member>
<member name="auto_translate_mode" type="int" setter="set_auto_translate_mode" getter="get_auto_translate_mode" enum="Node.AutoTranslateMode" default="0">
Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as [Label], [RichTextLabel], [Window], etc.). Also decides if the node's strings should be parsed for POT generation.
[b]Note:[/b] For the root node, auto translate mode can also be set via [member ProjectSettings.internationalization/rendering/root_node_auto_translate].
@ -1226,6 +1280,9 @@
<constant name="NOTIFICATION_VP_MOUSE_EXIT" value="1011">
Notification received when the mouse cursor leaves the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is [code]false[/code] and regardless if it's currently focused or not.
</constant>
<constant name="NOTIFICATION_WM_POSITION_CHANGED" value="1012">
Notification received when the window is moved.
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
Notification received from the OS when the application is exceeding its allocated memory.
Implemented only on iOS.
@ -1273,6 +1330,12 @@
<constant name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018">
Notification received when the [TextServer] is changed.
</constant>
<constant name="NOTIFICATION_ACCESSIBILITY_UPDATE" value="3000">
Notification received when an accessibility information update is required.
</constant>
<constant name="NOTIFICATION_ACCESSIBILITY_INVALIDATE" value="3001">
Notification received when accessibility elements are invalidated. All node accessibility elements are automatically deleted after receiving this message, therefore all existing references to such elements should be discarded.
</constant>
<constant name="PROCESS_MODE_INHERIT" value="0" enum="ProcessMode">
Inherits [member process_mode] from the node's parent. This is the default for any newly created node.
</constant>
@ -1316,7 +1379,7 @@
Disables physics interpolation for this node and for children set to [constant PHYSICS_INTERPOLATION_MODE_INHERIT].
</constant>
<constant name="DUPLICATE_SIGNALS" value="1" enum="DuplicateFlags">
Duplicate the node's signal connections.
Duplicate the node's signal connections that are connected with the [constant Object.CONNECT_PERSIST] flag.
</constant>
<constant name="DUPLICATE_GROUPS" value="2" enum="DuplicateFlags">
Duplicate the node's groups.

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Node3D" inherits="Node" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<class name="Node3D" inherits="Node" keywords="spatial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Most basic 3D game object, parent of all 3D-related nodes.
Base object in 3D space, inherited by all 3D nodes.
</brief_description>
<description>
Most basic 3D game object, with a [Transform3D] and visibility settings. All other 3D game objects inherit from [Node3D]. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system.
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg_to_rad].
[b]Note:[/b] Be aware that "Spatial" nodes are now called "Node3D" starting with Godot 4. Any Godot 3.x references to "Spatial" nodes refer to "Node3D" in Godot 4.
The [Node3D] node is the base representation of a node in 3D space. All other 3D nodes inherit from this class.
Affine operations (translation, rotation, scale) are calculated in the coordinate system relative to the parent, unless the [Node3D]'s [member top_level] is [code]true[/code]. In this coordinate system, affine operations correspond to direct affine operations on the [Node3D]'s [member transform]. The term [i]parent space[/i] refers to this coordinate system. The coordinate system that is attached to the [Node3D] itself is referred to as object-local coordinate system, or [i]local space[/i].
[b]Note:[/b] Unless otherwise specified, all methods that need angle parameters must receive angles in [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg_to_rad].
[b]Note:[/b] In Godot 3 and older, [Node3D] was named [i]Spatial[/i].
</description>
<tutorials>
<link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link>
@ -18,32 +18,33 @@
<return type="void" />
<param index="0" name="gizmo" type="Node3DGizmo" />
<description>
Attach an editor gizmo to this [Node3D].
[b]Note:[/b] The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D].
Attaches the given [param gizmo] to this node. Only works in the editor.
[b]Note:[/b] [param gizmo] should be an [EditorNode3DGizmo]. The argument type is [Node3DGizmo] to avoid depending on editor classes in [Node3D].
</description>
</method>
<method name="clear_gizmos">
<return type="void" />
<description>
Clear all gizmos attached to this [Node3D].
Clears all [EditorNode3DGizmo] objects attached to this node. Only works in the editor.
</description>
</method>
<method name="clear_subgizmo_selection">
<return type="void" />
<description>
Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change.
Deselects all subgizmos for this node. Useful to call when the selected subgizmo may no longer exist after a property change. Only works in the editor.
</description>
</method>
<method name="force_update_transform">
<return type="void" />
<description>
Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
Forces the node's [member global_transform] to update, by sending [constant NOTIFICATION_TRANSFORM_CHANGED]. Fails if the node is not inside the tree.
[b]Note:[/b] For performance reasons, transform changes are usually accumulated and applied [i]once[/i] at the end of the frame. The update propagates through [Node3D] children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations).
</description>
</method>
<method name="get_gizmos" qualifiers="const">
<return type="Node3DGizmo[]" />
<description>
Returns all the gizmos attached to this [Node3D].
Returns all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor.
</description>
</method>
<method name="get_global_transform_interpolated">
@ -57,14 +58,15 @@
<method name="get_parent_node_3d" qualifiers="const">
<return type="Node3D" />
<description>
Returns the parent [Node3D], or [code]null[/code] if no parent exists, the parent is not of type [Node3D], or [member top_level] is [code]true[/code].
[b]Note:[/b] Calling this method is not equivalent to [code]get_parent() as Node3D[/code], which does not take [member top_level] into account.
Returns the parent [Node3D] that directly affects this node's [member global_transform]. Returns [code]null[/code] if no parent exists, the parent is not a [Node3D], or [member top_level] is [code]true[/code].
[b]Note:[/b] This method is not always equivalent to [method Node.get_parent], which does not take [member top_level] into account.
</description>
</method>
<method name="get_world_3d" qualifiers="const">
<return type="World3D" />
<description>
Returns the current [World3D] resource this [Node3D] node is registered to.
Returns the [World3D] this node is registered to.
Usually, this is the same as the world used by this node's viewport (see [method Node.get_viewport] and [method Viewport.find_world_3d]).
</description>
</method>
<method name="global_rotate">
@ -72,53 +74,54 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system.
Rotates this node's [member global_basis] around the global [param axis] by the given [param angle], in radians. This operation is calculated in global space (relative to the world) and preserves the [member global_position].
</description>
</method>
<method name="global_scale">
<return type="void" />
<param index="0" name="scale" type="Vector3" />
<description>
Scales the global (world) transformation by the given [Vector3] scale factors.
Scales this node's [member global_basis] by the given [param scale] factor. This operation is calculated in global space (relative to the world) and preserves the [member global_position].
[b]Note:[/b] This method is not to be confused with the [member scale] property.
</description>
</method>
<method name="global_translate">
<return type="void" />
<param index="0" name="offset" type="Vector3" />
<description>
Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system.
Adds the given translation [param offset] to the node's [member global_position] in global space (relative to the world).
</description>
</method>
<method name="hide">
<return type="void" />
<description>
Disables rendering of this node. Changes [member visible] to [code]false[/code].
Prevents this node from being rendered. Equivalent to setting [member visible] to [code]false[/code]. This is the opposite of [method show].
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns whether node notifies about its local transformation changes. [Node3D] will not propagate this by default.
Returns [code]true[/code] if the node receives [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes. This is enabled with [method set_notify_local_transform].
</description>
</method>
<method name="is_scale_disabled" qualifiers="const">
<return type="bool" />
<description>
Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale.
Returns [code]true[/code] if this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method set_disable_scale] and [method orthonormalize].
[b]Note:[/b] [member transform] is not affected by this setting.
</description>
</method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default.
Returns [code]true[/code] if the node receives [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes. This is enabled with [method set_notify_transform].
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree.
Visibility is checked only in parent nodes that inherit from [Node3D]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node2D]), it is assumed to be visible.
[b]Note:[/b] This method does not take [member VisualInstance3D.layers] into account, so even if this method returns [code]true[/code], the node might end up not being rendered.
Returns [code]true[/code] if this node is inside the scene tree and the [member visible] property is [code]true[/code] for this node and all of its [Node3D] ancestors [i]in sequence[/i]. An ancestor of any other type (such as [Node] or [Node2D]) breaks the sequence. See also [method Node.get_parent].
[b]Note:[/b] This method cannot take [member VisualInstance3D.layers] into account, so even if this method returns [code]true[/code], the node may not be rendered.
</description>
</method>
<method name="look_at">
@ -127,12 +130,11 @@
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<param index="2" name="use_model_front" type="bool" default="false" />
<description>
Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position.
Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position. This operation is calculated in global space (relative to the world).
The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
The [param target] position cannot be the same as the node's position, the [param up] vector cannot be zero.
The [param target] and the [param up] cannot be [constant Vector3.ZERO], and shouldn't be colinear to avoid unintended rotation around local Z axis.
Operations take place in global space, which means that the node must be in the scene tree.
The [param target] position cannot be the same as the node's position, the [param up] vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the [param target] position cannot be parallel to the [param up] vector, to avoid an unintended rotation around the local Z axis.
If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
[b]Note:[/b] This method fails if the node is not in the scene tree. If necessary, use [method look_at_from_position] instead.
</description>
</method>
<method name="look_at_from_position">
@ -142,13 +144,13 @@
<param index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<param index="3" name="use_model_front" type="bool" default="false" />
<description>
Moves the node to the specified [param position], and then rotates the node to point toward the [param target] as per [method look_at]. Operations take place in global space.
Moves the node to the specified [param position], then rotates the node to point toward the [param target] position, similar to [method look_at]. This operation is calculated in global space (relative to the world).
</description>
</method>
<method name="orthonormalize">
<return type="void" />
<description>
Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D].
Orthonormalizes this node's [member basis]. This method sets this node's [member scale] to [constant Vector3.ONE] (or its negative counterpart), but preserves the [member position] and [member rotation]. See also [method Transform3D.orthonormalized].
</description>
</method>
<method name="rotate">
@ -156,7 +158,7 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians.
Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].
</description>
</method>
<method name="rotate_object_local">
@ -164,69 +166,74 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system.
Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in local space (relative to this node) and preserves the [member position].
</description>
</method>
<method name="rotate_x">
<return type="void" />
<param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the X axis by angle in radians.
Rotates this node's [member basis] around the X axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].
</description>
</method>
<method name="rotate_y">
<return type="void" />
<param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the Y axis by angle in radians.
Rotates this node's [member basis] around the Y axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].
</description>
</method>
<method name="rotate_z">
<return type="void" />
<param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the Z axis by angle in radians.
Rotates this node's [member basis] around the Z axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].
</description>
</method>
<method name="scale_object_local">
<return type="void" />
<param index="0" name="scale" type="Vector3" />
<description>
Scales the local transformation by given 3D scale factors in object-local coordinate system.
Scales this node's [member basis] by the given [param scale] factor. This operation is calculated in local space (relative to this node) and preserves the [member position].
</description>
</method>
<method name="set_disable_scale">
<return type="void" />
<param index="0" name="disable" type="bool" />
<description>
Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved.
If [code]true[/code], this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method is_scale_disabled] and [method orthonormalize].
[b]Note:[/b] [member transform] is not affected by this setting.
</description>
</method>
<method name="set_identity">
<return type="void" />
<description>
Reset all transformations for this node (sets its [Transform3D] to the identity matrix).
Sets this node's [member transform] to [constant Transform3D.IDENTITY], which resets all transformations in parent space ([member position], [member rotation], and [member scale]).
</description>
</method>
<method name="set_ignore_transform_notification">
<return type="void" />
<param index="0" name="enabled" type="bool" />
<description>
Sets whether the node ignores notification that its transformation (global or local) changed.
If [code]true[/code], the node will not receive [constant NOTIFICATION_TRANSFORM_CHANGED] or [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED].
It may useful to call this method when handling these notifications to prevent infinite recursion.
</description>
</method>
<method name="set_notify_local_transform">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default.
If [code]true[/code], the node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes.
[b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly.
</description>
</method>
<method name="set_notify_transform">
<method name="set_notify_transform" keywords="set_notify_global_transform">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo.
If [code]true[/code], the node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes.
[b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly.
[b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]).
</description>
</method>
<method name="set_subgizmo_selection">
@ -235,143 +242,161 @@
<param index="1" name="id" type="int" />
<param index="2" name="transform" type="Transform3D" />
<description>
Set subgizmo selection for this node in the editor.
Selects the [param gizmo]'s subgizmo with the given [param id] and sets its transform. Only works in the editor.
[b]Note:[/b] The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D].
</description>
</method>
<method name="show">
<return type="void" />
<description>
Enables rendering of this node. Changes [member visible] to [code]true[/code].
Allows this node to be rendered. Equivalent to setting [member visible] to [code]true[/code]. This is the opposite of [method hide].
</description>
</method>
<method name="to_global" qualifiers="const">
<return type="Vector3" />
<param index="0" name="local_point" type="Vector3" />
<description>
Transforms [param local_point] from this node's local space to world space.
Returns the [param local_point] converted from this node's local space to global space. This is the opposite of [method to_local].
</description>
</method>
<method name="to_local" qualifiers="const">
<return type="Vector3" />
<param index="0" name="global_point" type="Vector3" />
<description>
Transforms [param global_point] from world space to this node's local space.
Returns the [param global_point] converted from global space to this node's local space. This is the opposite of [method to_global].
</description>
</method>
<method name="translate">
<return type="void" />
<param index="0" name="offset" type="Vector3" />
<description>
Changes the node's position by the given offset [Vector3].
Note that the translation [param offset] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate.
Adds the given translation [param offset] to the node's position, in local space (relative to this node).
[b]Note:[/b] Prefer using [method translate_object_local], instead, as this method may be changed in a future release.
[b]Note:[/b] Despite the naming convention, this operation is [b]not[/b] calculated in parent space for compatibility reasons. To translate in parent space, add [param offset] to the [member position] ([code]node_3d.position += offset[/code]).
</description>
</method>
<method name="translate_object_local">
<return type="void" />
<param index="0" name="offset" type="Vector3" />
<description>
Changes the node's position by the given offset [Vector3] in local space.
Adds the given translation [param offset] to the node's position, in local space (relative to this node).
</description>
</method>
<method name="update_gizmos">
<return type="void" />
<description>
Updates all the [Node3D] gizmos attached to this node.
Updates all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor.
</description>
</method>
</methods>
<members>
<member name="basis" type="Basis" setter="set_basis" getter="get_basis">
Basis of the [member transform] property. Represents the rotation, scale, and shear of this node.
Basis of the [member transform] property. Represents the rotation, scale, and shear of this node in parent space (relative to the parent node).
</member>
<member name="global_basis" type="Basis" setter="set_global_basis" getter="get_global_basis">
Global basis of this node. This is equivalent to [code]global_transform.basis[/code].
Basis of the [member global_transform] property. Represents the rotation, scale, and shear of this node in global space (relative to the world).
[b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Basis.IDENTITY].
</member>
<member name="global_position" type="Vector3" setter="set_global_position" getter="get_global_position">
Global position of this node. This is equivalent to [code]global_transform.origin[/code].
<member name="global_position" type="Vector3" setter="set_global_position" getter="get_global_position" keywords="global_translation">
Global position (translation) of this node in global space (relative to the world). This is equivalent to the [member global_transform]'s [member Transform3D.origin].
[b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO].
</member>
<member name="global_rotation" type="Vector3" setter="set_global_rotation" getter="get_global_rotation">
Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
Global rotation of this node as [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians and in global space (relative to the world). This value is obtained from [member global_basis]'s rotation.
- The [member Vector3.x] is the angle around the global X axis (pitch);
- The [member Vector3.y] is the angle around the global Y axis (yaw);
- The [member Vector3.z] is the angle around the global Z axis (roll).
[b]Note:[/b] Unlike [member rotation], this property always follows the YXZ convention ([constant EULER_ORDER_YXZ]).
[b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO].
</member>
<member name="global_rotation_degrees" type="Vector3" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees">
Helper property to access [member global_rotation] in degrees instead of radians.
The [member global_rotation] of this node, in degrees instead of radians.
[b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO].
</member>
<member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
World3D space (global) [Transform3D] of this node.
The transformation of this node, in global space (relative to the world). Contains and represents this node's [member global_position], [member global_rotation], and global scale.
[b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Transform3D.IDENTITY].
</member>
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code].
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)" keywords="translation">
Position (translation) of this node in parent space (relative to the parent node). This is equivalent to the [member transform]'s [member Transform3D.origin].
</member>
<member name="quaternion" type="Quaternion" setter="set_quaternion" getter="get_quaternion">
Access to the node rotation as a [Quaternion]. This property is ideal for tweening complex rotations.
Rotation of this node represented as a [Quaternion] in parent space (relative to the parent node). This value is obtained from [member basis]'s rotation.
[b]Note:[/b] Quaternions are much more suitable for 3D math but are less intuitive. Setting this property can be useful for interpolation (see [method Quaternion.slerp]).
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)">
Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the [member rotation_order] property.
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
[b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees].
Rotation of this node as [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians and in parent space (relative to the parent node). This value is obtained from [member basis]'s rotation.
- The [member Vector3.x] is the angle around the local X axis (pitch);
- The [member Vector3.y] is the angle around the local Y axis (yaw);
- The [member Vector3.z] is the angle around the local Z axis (roll).
The order of each consecutive rotation can be changed with [member rotation_order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]).
[b]Note:[/b] This property is edited in degrees in the inspector. If you want to use degrees in a script, use [member rotation_degrees].
</member>
<member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees">
Helper property to access [member rotation] in degrees instead of radians.
The [member rotation] of this node, in degrees instead of radians.
[b]Note:[/b] This is [b]not[/b] the property available in the Inspector dock.
</member>
<member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0">
Specify how rotation (and scale) will be presented in the editor.
How this node's rotation and scale are displayed in the Inspector dock.
</member>
<member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2">
Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property.
The axis rotation order of the [member rotation] property. The final orientation is calculated by rotating around the local X, Y, and Z axis in this order.
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
[b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale].
Scale of this node in local space (relative to this node). This value is obtained from [member basis]'s scale.
[b]Note:[/b] The behavior of some 3D node types is not affected by this property. These include [Light3D], [Camera3D], [AudioStreamPlayer3D], and more.
[b]Warning:[/b] The scale's components must either be all positive or all negative, and [b]not[/b] exactly [code]0.0[/code]. Otherwise, it won't be possible to obtain the scale from the [member basis]. This may cause the intended scale to be lost when reloaded from disk, and potentially other unstable behavior.
</member>
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.
If [code]true[/code], the node does not inherit its transformations from its parent. As such, node transformations will only be in global space, which also means that [member global_transform] and [member transform] will be identical.
</member>
<member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
Local space [Transform3D] of this node, with respect to the parent node.
The local transformation of this node, in parent space (relative to the parent node). Contains and represents this node's [member position], [member rotation], and [member scale].
</member>
<member name="visibility_parent" type="NodePath" setter="set_visibility_parent" getter="get_visibility_parent" default="NodePath(&quot;&quot;)">
Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account.
Path to the visibility range parent for this node and its descendants. The visibility parent must be a [GeometryInstance3D].
Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its descendants into account.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
If [code]true[/code], this node can be visible. The node is only rendered when all of its ancestors are visible, as well. That means [method is_visible_in_tree] must return [code]true[/code].
</member>
</members>
<signals>
<signal name="visibility_changed">
<description>
Emitted when node visibility changes.
Emitted when this node's visibility changes (see [member visible] and [method is_visible_in_tree]).
This signal is emitted [i]after[/i] the related [constant NOTIFICATION_VISIBILITY_CHANGED] notification.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
[Node3D] nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform.
In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has at least one valid gizmo.
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000" keywords="NOTIFICATION_GLOBAL_TRANSFORM_CHANGED">
Notification received when this node's [member global_transform] changes, if [method is_transform_notification_enabled] is [code]true[/code]. See also [method set_notify_transform].
[b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly.
[b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]).
</constant>
<constant name="NOTIFICATION_ENTER_WORLD" value="41">
[Node3D] nodes receive this notification when they are registered to new [World3D] resource.
Notification received when this node is registered to a new [World3D] (see [method get_world_3d]).
</constant>
<constant name="NOTIFICATION_EXIT_WORLD" value="42">
[Node3D] nodes receive this notification when they are unregistered from current [World3D] resource.
Notification received when this node is unregistered from the current [World3D] (see [method get_world_3d]).
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
[Node3D] nodes receive this notification when their visibility changes.
Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]).
This notification is received [i]before[/i] the related [signal visibility_changed] signal.
</constant>
<constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="44">
[Node3D] nodes receive this notification when their local transform changes. This is not received when the transform of a parent node is changed.
In order for [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_local_transform].
Notification received when this node's [member transform] changes, if [method is_local_transform_notification_enabled] is [code]true[/code]. This is not received when a parent [Node3D]'s [member transform] changes. See also [method set_notify_local_transform].
[b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly.
</constant>
<constant name="ROTATION_EDIT_MODE_EULER" value="0" enum="RotationEditMode">
The rotation is edited using [Vector3] Euler angles.
The rotation is edited using a [Vector3] in [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url].
</constant>
<constant name="ROTATION_EDIT_MODE_QUATERNION" value="1" enum="RotationEditMode">
The rotation is edited using a [Quaternion].
</constant>
<constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode">
The rotation is edited using a [Basis]. In this mode, [member scale] can't be edited separately.
The rotation is edited using a [Basis]. In this mode, the raw [member basis]'s axes can be freely modified, but the [member scale] property is not available.
</constant>
</constants>
</class>

View file

@ -471,19 +471,23 @@
<method name="get_stderr_type" qualifiers="const">
<return type="int" enum="OS.StdHandleType" />
<description>
Returns type of the standard error device.
Returns the type of the standard error device.
[b]Note:[/b] This method is implemented on Linux, macOS, and Windows.
</description>
</method>
<method name="get_stdin_type" qualifiers="const">
<return type="int" enum="OS.StdHandleType" />
<description>
Returns type of the standard input device.
Returns the type of the standard input device.
[b]Note:[/b] This method is implemented on Linux, macOS, and Windows.
[b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the standard input. If you need a single executable with full console support, use a custom build compiled with the [code]windows_subsystem=console[/code] flag.
</description>
</method>
<method name="get_stdout_type" qualifiers="const">
<return type="int" enum="OS.StdHandleType" />
<description>
Returns type of the standard output device.
Returns the type of the standard output device.
[b]Note:[/b] This method is implemented on Linux, macOS, and Windows.
</description>
</method>
<method name="get_system_ca_certificates">
@ -720,9 +724,9 @@
</method>
<method name="read_buffer_from_stdin">
<return type="PackedByteArray" />
<param index="0" name="buffer_size" type="int" />
<param index="0" name="buffer_size" type="int" default="1024" />
<description>
Reads a user input as raw data from the standard input. This operation can be [i]blocking[/i], which causes the window to freeze if [method read_string_from_stdin] is called on the main thread.
Reads a user input as raw data from the standard input. This operation can be [i]blocking[/i], which causes the window to freeze if [method read_buffer_from_stdin] is called on the main thread.
- If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]).
- If standard input is pipe, this method will block until a specific amount of data is read or pipe is closed.
- If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately.
@ -732,7 +736,7 @@
</method>
<method name="read_string_from_stdin">
<return type="String" />
<param index="0" name="buffer_size" type="int" />
<param index="0" name="buffer_size" type="int" default="1024" />
<description>
Reads a user input as a UTF-8 encoded string from the standard input. This operation can be [i]blocking[/i], which causes the window to freeze if [method read_string_from_stdin] is called on the main thread.
- If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]).

View file

@ -205,7 +205,6 @@
<param index="0" name="iter" type="Array" />
<description>
Initializes the iterator. [param iter] stores the iteration state. Since GDScript does not support passing arguments by reference, a single-element array is used as a wrapper. Returns [code]true[/code] so long as the iterator has not reached the end.
Example:
[codeblock]
class MyRange:
var _from
@ -519,131 +518,9 @@
<param index="2" name="flags" type="int" default="0" />
<description>
Connects a [param signal] by name to a [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum ConnectFlags] constants).
A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and pushes an error message, unless the signal is connected with [constant CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.
If the [param callable]'s object is freed, the connection will be lost.
[b]Examples with recommended syntax:[/b]
Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach.
[codeblocks]
[gdscript]
func _ready():
var button = Button.new()
# `button_down` here is a Signal variant type, and we thus call the Signal.connect() method, not Object.connect().
# See discussion below for a more in-depth overview of the API.
button.button_down.connect(_on_button_down)
# This assumes that a `Player` class exists, which defines a `hit` signal.
var player = Player.new()
# We use Signal.connect() again, and we also use the Callable.bind() method,
# which returns a new Callable with the parameter binds.
player.hit.connect(_on_player_hit.bind("sword", 100))
func _on_button_down():
print("Button down!")
func _on_player_hit(weapon_type, damage):
print("Hit with weapon %s for %d damage." % [weapon_type, damage])
[/gdscript]
[csharp]
public override void _Ready()
{
var button = new Button();
// C# supports passing signals as events, so we can use this idiomatic construct:
button.ButtonDown += OnButtonDown;
// This assumes that a `Player` class exists, which defines a `Hit` signal.
var player = new Player();
// We can use lambdas when we need to bind additional parameters.
player.Hit += () =&gt; OnPlayerHit("sword", 100);
}
private void OnButtonDown()
{
GD.Print("Button down!");
}
private void OnPlayerHit(string weaponType, int damage)
{
GD.Print($"Hit with weapon {weaponType} for {damage} damage.");
}
[/csharp]
[/codeblocks]
[b][code skip-lint]Object.connect()[/code] or [code skip-lint]Signal.connect()[/code]?[/b]
As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one.
[codeblocks]
[gdscript]
func _ready():
var button = Button.new()
# Option 1: Object.connect() with an implicit Callable for the defined function.
button.connect("button_down", _on_button_down)
# Option 2: Object.connect() with a constructed Callable using a target object and method name.
button.connect("button_down", Callable(self, "_on_button_down"))
# Option 3: Signal.connect() with an implicit Callable for the defined function.
button.button_down.connect(_on_button_down)
# Option 4: Signal.connect() with a constructed Callable using a target object and method name.
button.button_down.connect(Callable(self, "_on_button_down"))
func _on_button_down():
print("Button down!")
[/gdscript]
[csharp]
public override void _Ready()
{
var button = new Button();
// Option 1: In C#, we can use signals as events and connect with this idiomatic syntax:
button.ButtonDown += OnButtonDown;
// Option 2: GodotObject.Connect() with a constructed Callable from a method group.
button.Connect(Button.SignalName.ButtonDown, Callable.From(OnButtonDown));
// Option 3: GodotObject.Connect() with a constructed Callable using a target object and method name.
button.Connect(Button.SignalName.ButtonDown, new Callable(this, MethodName.OnButtonDown));
}
private void OnButtonDown()
{
GD.Print("Button down!");
}
[/csharp]
[/codeblocks]
While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), [b]option 3[/b] offers the best validation: it will print a compile-time error if either the [code]button_down[/code] [Signal] or the [code]_on_button_down[/code] [Callable] are not defined. On the other hand, [b]option 2[/b] only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
[b]Binding and passing parameters:[/b]
The syntax to bind parameters is through [method Callable.bind], which returns a copy of the [Callable] with its parameters bound.
When calling [method emit_signal] or [method Signal.emit], the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters.
[codeblocks]
[gdscript]
func _ready():
# This assumes that a `Player` class exists, which defines a `hit` signal.
var player = Player.new()
# Using Callable.bind().
player.hit.connect(_on_player_hit.bind("sword", 100))
# Parameters added when emitting the signal are passed first.
player.hit.emit("Dark lord", 5)
# We pass two arguments when emitting (`hit_by`, `level`),
# and bind two more arguments when connecting (`weapon_type`, `damage`).
func _on_player_hit(hit_by, level, weapon_type, damage):
print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage])
[/gdscript]
[csharp]
public override void _Ready()
{
// This assumes that a `Player` class exists, which defines a `Hit` signal.
var player = new Player();
// Using lambda expressions that create a closure that captures the additional parameters.
// The lambda only receives the parameters defined by the signal's delegate.
player.Hit += (hitBy, level) =&gt; OnPlayerHit(hitBy, level, "sword", 100);
// Parameters added when emitting the signal are passed first.
player.EmitSignal(SignalName.Hit, "Dark lord", 5);
}
// We pass two arguments when emitting (`hit_by`, `level`),
// and bind two more arguments when connecting (`weapon_type`, `damage`).
private void OnPlayerHit(string hitBy, int level, string weaponType, int damage)
{
GD.Print($"Hit by {hitBy} (level {level}) with weapon {weaponType} for {damage} damage.");
}
[/csharp]
[/codeblocks]
A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and generates an error, unless the signal is connected with [constant CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.
[b]Note:[/b] If the [param callable]'s object is freed, the connection will be lost.
[b]Note:[/b] In GDScript, it is generally recommended to connect signals with [method Signal.connect] instead.
</description>
</method>
<method name="disconnect">

View file

@ -42,6 +42,13 @@
Clears all the items in the [OptionButton].
</description>
</method>
<method name="get_item_auto_translate_mode" qualifiers="const">
<return type="int" enum="Node.AutoTranslateMode" />
<param index="0" name="idx" type="int" />
<description>
Returns the auto translate mode of the item at index [param idx].
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<param index="0" name="idx" type="int" />
@ -153,6 +160,15 @@
If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button.
</description>
</method>
<method name="set_item_auto_translate_mode">
<return type="void" />
<param index="0" name="idx" type="int" />
<param index="1" name="mode" type="int" enum="Node.AutoTranslateMode" />
<description>
Sets the auto translate mode of the item at index [param idx].
Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [OptionButton] itself.
</description>
</method>
<method name="set_item_disabled">
<return type="void" />
<param index="0" name="idx" type="int" />

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
[PackedByteArray] also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -56,6 +56,30 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="bswap16">
<return type="void" />
<param index="0" name="offset" type="int" default="0" />
<param index="1" name="count" type="int" default="-1" />
<description>
Swaps the byte order of [param count] 16-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 2, the byte after the last processed 16-bit segment is not modified.
</description>
</method>
<method name="bswap32">
<return type="void" />
<param index="0" name="offset" type="int" default="0" />
<param index="1" name="count" type="int" default="-1" />
<description>
Swaps the byte order of [param count] 32-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 4, bytes after the last processed 32-bit segment are not modified.
</description>
</method>
<method name="bswap64">
<return type="void" />
<param index="0" name="offset" type="int" default="0" />
<param index="1" name="count" type="int" default="-1" />
<description>
Swaps the byte order of [param count] 64-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 8, bytes after the last processed 64-bit segment are not modified.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
@ -292,6 +316,13 @@
Encodes a [Variant] at the index of [param byte_offset] bytes. A sufficient space must be allocated, depending on the encoded variant's size. If [param allow_objects] is [code]false[/code], [Object]-derived values are not permitted and will instead be serialized as ID-only.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="int" />
@ -320,6 +351,16 @@
Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. This is the inverse of [method String.to_ascii_buffer].
</description>
</method>
<method name="get_string_from_multibyte_char" qualifiers="const">
<return type="String" />
<param index="0" name="encoding" type="String" default="&quot;&quot;" />
<description>
Converts system multibyte code page encoded array to [String]. If conversion fails, empty string is returned. This is the inverse of [method String.to_multibyte_char_buffer].
The values permitted for [param encoding] are system dependent. If [param encoding] is empty string, system default encoding is used.
- For Windows, see [url=https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers]Code Page Identifiers[/url] .NET names.
- For macOS and Linux/BSD, see [code]libiconv[/code] library documentation and [code]iconv --list[/code] for a list of supported encodings.
</description>
</method>
<method name="get_string_from_utf8" qualifiers="const">
<return type="String" />
<description>
@ -329,13 +370,13 @@
<method name="get_string_from_utf16" qualifiers="const">
<return type="String" />
<description>
Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of [method String.to_utf16_buffer].
Converts UTF-16 encoded array to [String]. If the BOM is missing, little-endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of [method String.to_utf16_buffer].
</description>
</method>
<method name="get_string_from_utf32" qualifiers="const">
<return type="String" />
<description>
Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. This is the inverse of [method String.to_utf32_buffer].
Converts UTF-32 encoded array to [String]. Returns empty string if source array is not valid UTF-32 string. This is the inverse of [method String.to_utf32_buffer].
</description>
</method>
<method name="get_string_from_wchar" qualifiers="const">
@ -408,6 +449,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedColorArray] versus [code]Array[Color][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -79,6 +79,13 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="Color" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="Color" />
@ -141,6 +148,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes.
If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -77,6 +77,14 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="float" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="float" />
@ -141,6 +149,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -7,7 +7,7 @@
An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes.
If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedFloat64Array] versus [code]Array[float][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -78,6 +78,14 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="float" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="float" />
@ -142,6 +150,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -75,6 +75,13 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="int" />
@ -137,6 +144,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -7,7 +7,7 @@
An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt64Array] versus [code]Array[int][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -76,6 +76,13 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="int" />
@ -138,6 +145,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -12,7 +12,7 @@
print(string) # "hello world"
[/codeblock]
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedStringArray] versus [code]Array[String][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
<link title="Operating System Testing Demo">https://godotengine.org/asset-library/asset/2789</link>
@ -82,6 +82,13 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="String" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="String" />
@ -144,6 +151,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector2Array] versus [code]Array[Vector2][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
<link title="Grid-based Navigation with AStarGrid2D Demo">https://godotengine.org/asset-library/asset/2723</link>
@ -82,6 +82,14 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="Vector2" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="Vector2" />
@ -146,6 +154,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector3Array] versus [code]Array[Vector3][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -81,6 +81,14 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="Vector3" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="Vector3" />
@ -145,6 +153,7 @@
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -6,7 +6,7 @@
<description>
An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector4Array] versus [code]Array[Vector4][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
</description>
<tutorials>
</tutorials>
@ -81,6 +81,14 @@
Creates a copy of the array, and returns it.
</description>
</method>
<method name="erase">
<return type="bool" />
<param index="0" name="value" type="Vector4" />
<description>
Removes the first occurrence of a value from the array and returns [code]true[/code]. If the value does not exist in the array, nothing happens and [code]false[/code] is returned. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="fill">
<return type="void" />
<param index="0" name="value" type="Vector4" />
@ -144,7 +152,8 @@
<return type="int" />
<param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one.
Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.
</description>
</method>
<method name="reverse">

View file

@ -13,6 +13,10 @@
<member name="curve" type="Curve3D" setter="set_curve" getter="get_curve">
A [Curve3D] describing the path.
</member>
<member name="debug_custom_color" type="Color" setter="set_debug_custom_color" getter="get_debug_custom_color" default="Color(0, 0, 0, 1)">
The custom color to use to draw the shape in the editor.
If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in EditorSettings is used.
</member>
</members>
<signals>
<signal name="curve_changed">
@ -20,5 +24,10 @@
Emitted when the [member curve] changes.
</description>
</signal>
<signal name="debug_color_changed">
<description>
Emitted when the [member debug_custom_color] changes.
</description>
</signal>
</signals>
</class>

View file

@ -195,34 +195,34 @@
Output latency of the [AudioServer]. Equivalent to calling [method AudioServer.get_output_latency], it is not recommended to call this every frame.
</constant>
<constant name="NAVIGATION_ACTIVE_MAPS" value="24" enum="Monitor">
Number of active navigation maps in the [NavigationServer3D]. This also includes the two empty default navigation maps created by World2D and World3D.
Number of active navigation maps in [NavigationServer2D] and [NavigationServer3D]. This also includes the two empty default navigation maps created by World2D and World3D.
</constant>
<constant name="NAVIGATION_REGION_COUNT" value="25" enum="Monitor">
Number of active navigation regions in the [NavigationServer3D].
Number of active navigation regions in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_AGENT_COUNT" value="26" enum="Monitor">
Number of active navigation agents processing avoidance in the [NavigationServer3D].
Number of active navigation agents processing avoidance in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_LINK_COUNT" value="27" enum="Monitor">
Number of active navigation links in the [NavigationServer3D].
Number of active navigation links in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_POLYGON_COUNT" value="28" enum="Monitor">
Number of navigation mesh polygons in the [NavigationServer3D].
Number of navigation mesh polygons in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_EDGE_COUNT" value="29" enum="Monitor">
Number of navigation mesh polygon edges in the [NavigationServer3D].
Number of navigation mesh polygon edges in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_EDGE_MERGE_COUNT" value="30" enum="Monitor">
Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer3D].
Number of navigation mesh polygon edges that were merged due to edge key overlap in [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_EDGE_CONNECTION_COUNT" value="31" enum="Monitor">
Number of polygon edges that are considered connected by edge proximity [NavigationServer3D].
Number of polygon edges that are considered connected by edge proximity [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="NAVIGATION_EDGE_FREE_COUNT" value="32" enum="Monitor">
Number of navigation mesh polygon edges that could not be merged in the [NavigationServer3D]. The edges still may be connected by edge proximity or with links.
Number of navigation mesh polygon edges that could not be merged in [NavigationServer2D] and [NavigationServer3D]. The edges still may be connected by edge proximity or with links.
</constant>
<constant name="NAVIGATION_OBSTACLE_COUNT" value="33" enum="Monitor">
Number of active navigation obstacles in the [NavigationServer3D].
Number of active navigation obstacles in the [NavigationServer2D] and [NavigationServer3D].
</constant>
<constant name="PIPELINE_COMPILATIONS_CANVAS" value="34" enum="Monitor">
Number of pipeline compilations that were triggered by the 2D canvas renderer.
@ -239,7 +239,67 @@
<constant name="PIPELINE_COMPILATIONS_SPECIALIZATION" value="38" enum="Monitor">
Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever.
</constant>
<constant name="MONITOR_MAX" value="39" enum="Monitor">
<constant name="NAVIGATION_2D_ACTIVE_MAPS" value="39" enum="Monitor">
Number of active navigation maps in the [NavigationServer2D]. This also includes the two empty default navigation maps created by World2D.
</constant>
<constant name="NAVIGATION_2D_REGION_COUNT" value="40" enum="Monitor">
Number of active navigation regions in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_AGENT_COUNT" value="41" enum="Monitor">
Number of active navigation agents processing avoidance in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_LINK_COUNT" value="42" enum="Monitor">
Number of active navigation links in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_POLYGON_COUNT" value="43" enum="Monitor">
Number of navigation mesh polygons in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_EDGE_COUNT" value="44" enum="Monitor">
Number of navigation mesh polygon edges in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_EDGE_MERGE_COUNT" value="45" enum="Monitor">
Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_EDGE_CONNECTION_COUNT" value="46" enum="Monitor">
Number of polygon edges that are considered connected by edge proximity [NavigationServer2D].
</constant>
<constant name="NAVIGATION_2D_EDGE_FREE_COUNT" value="47" enum="Monitor">
Number of navigation mesh polygon edges that could not be merged in the [NavigationServer2D]. The edges still may be connected by edge proximity or with links.
</constant>
<constant name="NAVIGATION_2D_OBSTACLE_COUNT" value="48" enum="Monitor">
Number of active navigation obstacles in the [NavigationServer2D].
</constant>
<constant name="NAVIGATION_3D_ACTIVE_MAPS" value="49" enum="Monitor">
Number of active navigation maps in the [NavigationServer3D]. This also includes the two empty default navigation maps created by World3D.
</constant>
<constant name="NAVIGATION_3D_REGION_COUNT" value="50" enum="Monitor">
Number of active navigation regions in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_AGENT_COUNT" value="51" enum="Monitor">
Number of active navigation agents processing avoidance in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_LINK_COUNT" value="52" enum="Monitor">
Number of active navigation links in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_POLYGON_COUNT" value="53" enum="Monitor">
Number of navigation mesh polygons in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_EDGE_COUNT" value="54" enum="Monitor">
Number of navigation mesh polygon edges in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_EDGE_MERGE_COUNT" value="55" enum="Monitor">
Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_EDGE_CONNECTION_COUNT" value="56" enum="Monitor">
Number of polygon edges that are considered connected by edge proximity [NavigationServer3D].
</constant>
<constant name="NAVIGATION_3D_EDGE_FREE_COUNT" value="57" enum="Monitor">
Number of navigation mesh polygon edges that could not be merged in the [NavigationServer3D]. The edges still may be connected by edge proximity or with links.
</constant>
<constant name="NAVIGATION_3D_OBSTACLE_COUNT" value="58" enum="Monitor">
Number of active navigation obstacles in the [NavigationServer3D].
</constant>
<constant name="MONITOR_MAX" value="59" enum="Monitor">
Represents the size of the [enum Monitor] enum.
</constant>
</constants>

View file

@ -33,14 +33,14 @@
<return type="Dictionary" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead.
[b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields:
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
[code]collider_id[/code]: The colliding object's ID.
[code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code].
[code]normal[/code]: The collision normal of the query shape at the intersection point, pointing away from the intersecting object.
[code]point[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the shape did not intersect anything, then an empty dictionary is returned instead.
</description>
</method>
<method name="intersect_point">

View file

@ -15,7 +15,7 @@
<return type="PackedFloat32Array" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object.
Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters3D] object.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
[b]Note:[/b] Any [Shape3D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape3D]s that the shape is already colliding with.
</description>

View file

@ -10,7 +10,10 @@
</tutorials>
<members>
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="maximize_disabled" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="minimize_disabled" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="popup_window" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="popup_wm_hint" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />

View file

@ -237,6 +237,13 @@
Returns the accelerator of the item at the given [param index]. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]). If no accelerator is defined for the specified [param index], [method get_item_accelerator] returns [code]0[/code] (corresponding to [constant @GlobalScope.KEY_NONE]).
</description>
</method>
<method name="get_item_auto_translate_mode" qualifiers="const">
<return type="int" enum="Node.AutoTranslateMode" />
<param index="0" name="index" type="int" />
<description>
Returns the auto translate mode of the item at the given [param index].
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<param index="0" name="index" type="int" />
@ -462,6 +469,15 @@
Mark the item at the given [param index] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_auto_translate_mode">
<return type="void" />
<param index="0" name="index" type="int" />
<param index="1" name="mode" type="int" enum="Node.AutoTranslateMode" />
<description>
Sets the auto translate mode of the item at the given [param index].
Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [PopupMenu] itself.
</description>
</method>
<method name="set_item_checked">
<return type="void" />
<param index="0" name="index" type="int" />

View file

@ -74,5 +74,7 @@
</constant>
<constant name="COMPRESSION_MODE_BPTC" value="5" enum="CompressionMode">
</constant>
<constant name="COMPRESSION_MODE_ASTC" value="6" enum="CompressionMode">
</constant>
</constants>
</class>

View file

@ -49,7 +49,7 @@
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
If [code]true[/code], the order of the vertices in each triangle is reversed, resulting in the backside of the mesh being drawn.
This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">

View file

@ -114,6 +114,14 @@
[/codeblocks]
</description>
</method>
<method name="get_setting_with_override_and_custom_features" qualifiers="const">
<return type="Variant" />
<param index="0" name="name" type="StringName" />
<param index="1" name="features" type="PackedStringArray" />
<description>
Similar to [method get_setting_with_override], but applies feature tag overrides instead of current OS features.
</description>
</method>
<method name="globalize_path" qualifiers="const">
<return type="String" />
<param index="0" name="path" type="String" />
@ -235,6 +243,16 @@
</method>
</methods>
<members>
<member name="accessibility/general/accessibility_support" type="int" setter="" getter="" default="0">
Accessibility support mode:
- [b]Auto[/b] ([code]0[/code]): accessibility support is enabled, but accessibility information updates are processed only if an assistive app (e.g. screen reader or Braille display) is active (default).
- [b]Always Active[/b] ([code]1[/code]): accessibility support is enabled, and accessibility information updates are processed regardless of current assistive apps' status.
- [b]Disabled[/b] ([code]2[/code]): accessibility support is fully disabled.
[b]Note:[/b] Accessibility debugging tools, such as Accessibility Insights for Windows, macOS Accessibility Inspector, or AT-SPI Browser do not count as assistive apps. To test your app with these tools, use [code]1[/code].
</member>
<member name="accessibility/general/updates_per_second" type="int" setter="" getter="" default="60">
The number of accessibility information updates per second.
</member>
<member name="animation/warnings/check_angle_interpolation_type_conflicting" type="bool" setter="" getter="" default="true">
If [code]true[/code], [AnimationMixer] prints the warning of interpolation being forced to choose the shortest rotation path due to multiple angle interpolation types being mixed in the [AnimationMixer] cache.
</member>
@ -408,7 +426,7 @@
</member>
<member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="0.5">
The base strength of the panning effect for all [AudioStreamPlayer3D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener.
The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones.
The default value of [code]0.5[/code] is tuned for headphones which means that the opposite side channel goes no lower than 50% of the volume of the nearside channel. You may find that you can set this value higher for speakers to have the same effect since both ears can hear from each speaker.
</member>
<member name="audio/general/default_playback_type" type="int" setter="" getter="" default="0" experimental="">
Specifies the default playback type of the platform.
@ -427,7 +445,7 @@
Sets the [url=https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory]AVAudioSessionCategory[/url] on iOS. Use the [code]Playback[/code] category to get sound output, even if the phone is in silent mode.
</member>
<member name="audio/general/text_to_speech" type="bool" setter="" getter="" default="false">
If [code]true[/code], text-to-speech support is enabled, see [method DisplayServer.tts_get_voices] and [method DisplayServer.tts_speak].
If [code]true[/code], text-to-speech support is enabled on startup, otherwise it is enabled first time TTS method is used, see [method DisplayServer.tts_get_voices] and [method DisplayServer.tts_speak].
[b]Note:[/b] Enabling TTS can cause addition idle CPU usage and interfere with the sleep mode, so consider disabling it if TTS is not used.
</member>
<member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
@ -688,31 +706,58 @@
<member name="debug/shader_language/warnings/unused_varying" type="bool" setter="" getter="" default="true">
When set to [code]true[/code], produces a warning when a varying is never used.
</member>
<member name="debug/shapes/avoidance/agents_radius_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.25)">
<member name="debug/shapes/avoidance/2d/agents_radius_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.25)">
Color of the avoidance agents radius, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/enable_agents_radius" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/avoidance/2d/enable_agents_radius" type="bool" setter="" getter="" default="true">
If enabled, displays avoidance agents radius when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/enable_obstacles_radius" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/avoidance/2d/enable_obstacles_radius" type="bool" setter="" getter="" default="true">
If enabled, displays avoidance obstacles radius when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/enable_obstacles_static" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/avoidance/2d/enable_obstacles_static" type="bool" setter="" getter="" default="true">
If enabled, displays static avoidance obstacles when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/obstacles_radius_color" type="Color" setter="" getter="" default="Color(1, 0.5, 0, 0.25)">
<member name="debug/shapes/avoidance/2d/obstacles_radius_color" type="Color" setter="" getter="" default="Color(1, 0.5, 0, 0.25)">
Color of the avoidance obstacles radius, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/obstacles_static_edge_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
<member name="debug/shapes/avoidance/2d/obstacles_static_edge_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
Color of the static avoidance obstacles edges when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/obstacles_static_edge_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 1)">
<member name="debug/shapes/avoidance/2d/obstacles_static_edge_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 1)">
Color of the static avoidance obstacles edges when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/obstacles_static_face_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 0)">
<member name="debug/shapes/avoidance/2d/obstacles_static_face_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 0)">
Color of the static avoidance obstacles faces when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/obstacles_static_face_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.5)">
<member name="debug/shapes/avoidance/2d/obstacles_static_face_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.5)">
Color of the static avoidance obstacles faces when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/agents_radius_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.25)">
Color of the avoidance agents radius, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/enable_agents_radius" type="bool" setter="" getter="" default="true">
If enabled, displays avoidance agents radius when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/enable_obstacles_radius" type="bool" setter="" getter="" default="true">
If enabled, displays avoidance obstacles radius when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/enable_obstacles_static" type="bool" setter="" getter="" default="true">
If enabled, displays static avoidance obstacles when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/obstacles_radius_color" type="Color" setter="" getter="" default="Color(1, 0.5, 0, 0.25)">
Color of the avoidance obstacles radius, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/obstacles_static_edge_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
Color of the static avoidance obstacles edges when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/obstacles_static_edge_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 1)">
Color of the static avoidance obstacles edges when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/obstacles_static_face_pushin_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 0)">
Color of the static avoidance obstacles faces when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/avoidance/3d/obstacles_static_face_pushout_color" type="Color" setter="" getter="" default="Color(1, 1, 0, 0.5)">
Color of the static avoidance obstacles faces when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu.
</member>
<member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)">
@ -727,58 +772,100 @@
<member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color(0, 0.6, 0.7, 0.42)">
Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/agent_path_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
<member name="debug/shapes/navigation/2d/agent_path_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
Color to display enabled navigation agent paths when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/agent_path_point_size" type="float" setter="" getter="" default="4.0">
<member name="debug/shapes/navigation/2d/agent_path_point_size" type="float" setter="" getter="" default="4.0">
Rasterized size (pixel) used to render navigation agent path points when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
<member name="debug/shapes/navigation/2d/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_agent_paths" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/navigation/2d/enable_agent_paths" type="bool" setter="" getter="" default="true">
If enabled, displays navigation agent paths when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/enable_agent_paths_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation agent paths through geometry when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/enable_edge_connections" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/navigation/2d/enable_edge_connections" type="bool" setter="" getter="" default="true">
If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_edge_connections_xray" type="bool" setter="" getter="" default="true">
If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_edge_lines" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/navigation/2d/enable_edge_lines" type="bool" setter="" getter="" default="true">
If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_edge_lines_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/navigation/2d/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_link_connections" type="bool" setter="" getter="" default="true">
<member name="debug/shapes/navigation/2d/enable_link_connections" type="bool" setter="" getter="" default="true">
If enabled, displays navigation link connections when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/enable_link_connections_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation link connections through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
<member name="debug/shapes/navigation/2d/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
<member name="debug/shapes/navigation/2d/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
<member name="debug/shapes/navigation/2d/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
<member name="debug/shapes/navigation/2d/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/link_connection_color" type="Color" setter="" getter="" default="Color(1, 0.5, 1, 1)">
<member name="debug/shapes/navigation/2d/link_connection_color" type="Color" setter="" getter="" default="Color(1, 0.5, 1, 1)">
Color to use to display navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/link_connection_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
<member name="debug/shapes/navigation/2d/link_connection_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
Color to use to display disabled navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/agent_path_color" type="Color" setter="" getter="" default="Color(1, 0, 0, 1)">
Color to display enabled navigation agent paths when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/3d/agent_path_point_size" type="float" setter="" getter="" default="4.0">
Rasterized size (pixel) used to render navigation agent path points when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/3d/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_agent_paths" type="bool" setter="" getter="" default="true">
If enabled, displays navigation agent paths when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/3d/enable_agent_paths_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation agent paths through geometry when an agent has debug enabled.
</member>
<member name="debug/shapes/navigation/3d/enable_edge_connections" type="bool" setter="" getter="" default="true">
If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_edge_connections_xray" type="bool" setter="" getter="" default="true">
If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_edge_lines" type="bool" setter="" getter="" default="true">
If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_edge_lines_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_link_connections" type="bool" setter="" getter="" default="true">
If enabled, displays navigation link connections when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/enable_link_connections_xray" type="bool" setter="" getter="" default="true">
If enabled, displays navigation link connections through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/link_connection_color" type="Color" setter="" getter="" default="Color(1, 0.5, 1, 1)">
Color to use to display navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/3d/link_connection_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
Color to use to display disabled navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/paths/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
@ -827,10 +914,10 @@
</member>
<member name="display/window/frame_pacing/android/swappy_mode" type="int" setter="" getter="" default="2">
Swappy mode to use. The options are:
- pipeline_forced_on: Try to honor [member Engine.max_fps]. Pipelining is always on. This is the same behavior as Desktop PC.
- auto_fps_pipeline_forced_on: Autocalculate max fps. Actual max_fps will be between 0 and [member Engine.max_fps]. While this sounds convenient, beware that Swappy will often downgrade max fps until it finds something that can be met and sustained. That means if your game runs between 40fps and 60fps on a 60hz screen, after some time Swappy will downgrade max fps so that the game renders at perfect 30fps.
- auto_fps_auto_pipeline: Same as auto_fps_pipeline_forced_on, but if Swappy detects that rendering is very fast (e.g. it takes &lt; 8ms to render on a 60hz screen) Swappy will disable pipelining to minimize input latency. This is the default.
[b]Note:[/b] If [member Engine.max_fps] is 0, actual max_fps will considered as to be the screen's refresh rate (often 60hz, 90hz or 120hz depending on device model and OS settings).
- [code]pipeline_forced_on[/code]: Try to honor [member Engine.max_fps]. Pipelining is always on. This is the same behavior as a desktop PC.
- [code]auto_fps_pipeline_forced_on[/code]: Calculate the max FPS automatically. The actual max FPS will be between [code]0[/code] and [member Engine.max_fps]. While this sounds convenient, beware that Swappy will often downgrade the max FPS until it finds a value that can be maintained. That means, if your game runs between 40fps and 60fps on a 60hz screen, after some time Swappy will downgrade the max FPS so that the game renders at a perfect 30fps.
- [code]auto_fps_auto_pipeline[/code]: Same as [code]auto_fps_pipeline_forced_on[/code], but if Swappy detects that rendering is very fast (for example it takes less than 8ms to render on a 60hz screen), Swappy will disable pipelining to minimize input latency. This is the default.
[b]Note:[/b] If [member Engine.max_fps] is [code]0[/code], the actual max FPS will be considered to be the screen's refresh rate (often 60hz, 90hz, or 120hz, depending on device model and OS settings).
</member>
<member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
@ -879,6 +966,12 @@
Main window initial screen, this setting is used only if [member display/window/size/initial_position_type] is set to "Other Screen Center" ([code]2[/code]).
[b]Note:[/b] This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of [member EditorSettings.run/window_placement/screen] is used instead.
</member>
<member name="display/window/size/maximize_disabled" type="bool" setter="" getter="" default="false">
If [code]true[/code], the main window's maximize button is disabled.
</member>
<member name="display/window/size/minimize_disabled" type="bool" setter="" getter="" default="false">
If [code]true[/code], the main window's minimize button is disabled.
</member>
<member name="display/window/size/mode" type="int" setter="" getter="" default="0">
Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves.
[b]Note:[/b] Game embedding is available only in the "Windowed" mode.
@ -1032,7 +1125,7 @@
</member>
<member name="filesystem/import/blender/enabled" type="bool" setter="" getter="" default="true">
If [code]true[/code], Blender 3D scene files with the [code].blend[/code] extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a Blender executable in the editor settings at [code]filesystem/import/blender/blender_path[/code]. Blender 3.0 or later is required.
This requires configuring a path to a Blender executable in the [member EditorSettings.filesystem/import/blender/blender_path] setting. Blender 3.0 or later is required.
</member>
<member name="filesystem/import/blender/enabled.android" type="bool" setter="" getter="" default="false">
Override for [member filesystem/import/blender/enabled] on Android where Blender can't easily be accessed from Godot.
@ -1056,8 +1149,11 @@
<member name="gui/common/snap_controls_to_pixels" type="bool" setter="" getter="" default="true">
If [code]true[/code], snaps [Control] node vertices to the nearest pixel to ensure they remain crisp even when the camera moves or zooms.
</member>
<member name="gui/common/swap_cancel_ok" type="bool" setter="" getter="">
If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time.
<member name="gui/common/swap_cancel_ok" type="int" setter="" getter="" default="0">
How to position the Cancel and OK buttons in the project's [AcceptDialog]s. Different platforms have different standard behaviors for this, which can be overridden using this setting.
- [b]Auto[/b] ([code]0[/code]) follows the platform convention: OK first on Windows, KDE, and LXQt, Cancel first on macOS and other Linux desktop environments. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time.
- [b]Cancel First[/b] ([code]1[/code]) forces the ordering Cancel/OK.
- [b]OK First[/b] ([code]2[/code]) forces the ordering OK/Cancel.
[b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].
</member>
<member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024">
@ -1119,10 +1215,18 @@
Default [InputEventAction] to confirm a focused button, menu or list item, or validate input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_accessibility_drag_and_drop" type="Dictionary" setter="" getter="">
Default [InputEventAction] to start or end a drag-and-drop operation without using mouse.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_cancel" type="Dictionary" setter="" getter="">
Default [InputEventAction] to discard a modal or pending input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_colorpicker_delete_preset" type="Dictionary" setter="" getter="">
Default [InputEventAction] to delete a color preset in a [ColorPicker].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_copy" type="Dictionary" setter="" getter="">
Default [InputEventAction] to copy a selection to the clipboard.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@ -1151,6 +1255,10 @@
Default [InputEventAction] to go up one directory in a [FileDialog].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_focus_mode" type="Dictionary" setter="" getter="">
Default [InputEventAction] to switch [TextEdit] [member input/ui_text_indent] between moving keyboard focus to the next [Control] in the scene and inputting a [code]Tab[/code] character.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_focus_next" type="Dictionary" setter="" getter="">
Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@ -1167,6 +1275,20 @@
Default [InputEventAction] to duplicate a [GraphNode] in a [GraphEdit].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_graph_follow_left" type="Dictionary" setter="" getter="">
Default [InputEventAction] to follow a [GraphNode] input port connection.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_graph_follow_left.macos" type="Dictionary" setter="" getter="">
macOS specific override for the shortcut to follow a [GraphNode] input port connection.
</member>
<member name="input/ui_graph_follow_right" type="Dictionary" setter="" getter="">
Default [InputEventAction] to follow a [GraphNode] output port connection.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_graph_follow_right.macos" type="Dictionary" setter="" getter="">
macOS specific override for the shortcut to follow a [GraphNode] output port connection.
</member>
<member name="input/ui_home" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@ -1438,12 +1560,18 @@
- [code]wintab[/code], uses Wacom "WinTab" driver.
- [code]dummy[/code], tablet input is disabled.
</member>
<member name="input_devices/pointing/android/disable_scroll_deadzone" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables the scroll deadzone on Android, allowing even very small scroll movements to be registered. This may increase scroll sensitivity but can also lead to unintended scrolling from slight finger movements.
</member>
<member name="input_devices/pointing/android/enable_long_press_as_right_click" type="bool" setter="" getter="" default="false">
If [code]true[/code], long press events on an Android touchscreen are transformed into right click events.
</member>
<member name="input_devices/pointing/android/enable_pan_and_scale_gestures" type="bool" setter="" getter="" default="false">
If [code]true[/code], multi-touch pan and scale gestures are enabled on Android devices.
</member>
<member name="input_devices/pointing/android/override_volume_buttons" type="bool" setter="" getter="" default="false">
If [code]true[/code], system volume changes are disabled when the buttons are used within the app.
</member>
<member name="input_devices/pointing/android/rotary_input_scroll_axis" type="int" setter="" getter="" default="1">
On Wear OS devices, defines which axis of the mouse wheel rotary input is mapped to. This rotary input is usually performed by rotating the physical or virtual (touch-based) bezel on a smartwatch.
</member>
@ -2376,9 +2504,10 @@
[b]Note:[/b] This property is only read when the project starts. To change the maximum number of simulated physics steps per frame at runtime, set [member Engine.max_physics_steps_per_frame] instead.
</member>
<member name="physics/common/physics_interpolation" type="bool" setter="" getter="" default="false">
If [code]true[/code], the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also [member Node.physics_interpolation_mode] and [method Node.reset_physics_interpolation].
[b]Note:[/b] If [code]true[/code], the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0.0[/code].
If [code]true[/code], the renderer will interpolate the transforms of objects (both physics and non-physics) between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also [method Node.reset_physics_interpolation].
[b]Note:[/b] Although this is a global setting, finer control of individual branches of the [SceneTree] is possible using [member Node.physics_interpolation_mode].
[b]Note:[/b] This property is only read when the project starts. To toggle physics interpolation at runtime, set [member SceneTree.physics_interpolation] instead.
[b]Note:[/b] Property [member physics/common/physics_jitter_fix] is automatically disabled if [member physics/common/physics_interpolation] is set to [code]true[/code], as the two methods are incompatible.
</member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
@ -2397,13 +2526,11 @@
[b]Note:[/b] Setting this too high can result in objects not depenetrating properly.
[b]Note:[/b] This applies to all shape queries, as well as physics bodies within the simulation.
[b]Note:[/b] This does not apply when enabling Jolt's enhanced internal edge removal, which supersedes this.
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/collisions/collision_margin_fraction" type="float" setter="" getter="" default="0.08">
The amount of collision margin to use for certain convex collision shapes, such as [BoxShape3D], [CylinderShape3D] and [ConvexPolygonShape3D], as a fraction of the shape's shortest axis, with [member Shape3D.margin] as the upper bound. This is mainly used to speed up collision detection with convex shapes.
[b]Note:[/b] Collision margins in Jolt do not add any extra size to the shape. Instead the shape is first shrunk by the margin and then expanded by the same amount, resulting in a shape with rounded corners.
[b]Note:[/b] Setting this value too close to [code]0.0[/code] may also negatively affect the accuracy of the collision detection with convex shapes.
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/joints/world_node" type="int" setter="" getter="" default="0">
Which of the two nodes bound by a joint should represent the world when one of the two is omitted, as either [member Joint3D.node_a] or [member Joint3D.node_b]. This can be thought of as having the omitted node be a [StaticBody3D] at the joint's position. Joint limits are more easily expressed when [member Joint3D.node_a] represents the world.
@ -2438,28 +2565,23 @@
<member name="physics/jolt_physics_3d/motion_queries/recovery_amount" type="float" setter="" getter="" default="0.4">
Fraction of the total penetration to depenetrate per iteration during motion queries.
[b]Note:[/b] This affects methods [method CharacterBody3D.move_and_slide], [method PhysicsBody3D.move_and_collide], [method PhysicsBody3D.test_move] and [method PhysicsServer3D.body_test_motion].
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/motion_queries/recovery_iterations" type="int" setter="" getter="" default="4">
The number of iterations to run when depenetrating during motion queries.
[b]Note:[/b] This affects methods [method CharacterBody3D.move_and_slide], [method PhysicsBody3D.move_and_collide], [method PhysicsBody3D.test_move] and [method PhysicsServer3D.body_test_motion].
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/motion_queries/use_enhanced_internal_edge_removal" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables Jolt's enhanced internal edge removal during motion queries. This can help alleviate ghost collisions, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions.
[b]Note:[/b] This affects methods [method CharacterBody3D.move_and_slide], [method PhysicsBody3D.move_and_collide], [method PhysicsBody3D.test_move] and [method PhysicsServer3D.body_test_motion].
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/queries/enable_ray_cast_face_index" type="bool" setter="" getter="" default="false">
If [code]true[/code], populates the [code]face_index[/code] field in the results of [method PhysicsDirectSpaceState3D.intersect_ray], also accessed through [method RayCast3D.get_collision_face_index]. If [code]false[/code], the [code]face_index[/code] field will be left at its default value of [code]-1[/code].
[b]Note:[/b] Enabling this setting will increase Jolt's memory usage for [ConcavePolygonShape3D] by around 25%.
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/queries/use_enhanced_internal_edge_removal" type="bool" setter="" getter="" default="false">
If [code]true[/code], enables Jolt's enhanced internal edge removal during shape queries. This can help alleviate ghost collisions when using shape queries for things like character movement, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions.
[b]Note:[/b] This affects methods [method PhysicsDirectSpaceState3D.cast_motion], [method PhysicsDirectSpaceState3D.collide_shape], [method PhysicsDirectSpaceState3D.get_rest_info] and [method PhysicsDirectSpaceState3D.intersect_shape].
[b]Note:[/b] Enabling this setting can cause certain shapes to be culled from the results entirely, but you will get at least one intersection per body.
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/simulation/allow_sleep" type="bool" setter="" getter="" default="true">
If [code]true[/code], [RigidBody3D] nodes are allowed to go to sleep if their velocity is below the threshold defined in [member physics/jolt_physics_3d/simulation/sleep_velocity_threshold] for the duration set in [member physics/jolt_physics_3d/simulation/sleep_time_threshold]. This can improve physics simulation performance when there are non-moving [RigidBody3D] nodes, at the cost of some nodes possibly failing to wake up in certain scenarios. Consider disabling this temporarily to troubleshoot [RigidBody3D] nodes not moving when they should.
@ -2485,7 +2607,6 @@
</member>
<member name="physics/jolt_physics_3d/simulation/bounce_velocity_threshold" type="float" setter="" getter="" default="1.0">
The minimum velocity needed before a collision can be bouncy, in meters per second.
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
</member>
<member name="physics/jolt_physics_3d/simulation/continuous_cd_max_penetration" type="float" setter="" getter="" default="0.25">
Fraction of a body's inner radius that may penetrate another body while using continuous collision detection.
@ -2619,6 +2740,7 @@
</member>
<member name="rendering/environment/glow/upscale_mode" type="int" setter="" getter="" default="1">
Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth.
[b]Note:[/b] [member rendering/environment/glow/upscale_mode] is only effective when using the Forward+ or Mobile rendering methods, as Compatibility uses a different glow implementation.
</member>
<member name="rendering/environment/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
Lower-end override for [member rendering/environment/glow/upscale_mode] on mobile devices, due to performance concerns or driver support.
@ -2957,6 +3079,7 @@
</member>
<member name="rendering/reflections/sky_reflections/texture_array_reflections" type="bool" setter="" getter="" default="true">
If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/reflections/sky_reflections/roughness_layers] times more memory.
[b]Note:[/b] Texture array reflections are always disabled on macOS on Intel GPUs due to driver bugs.
</member>
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
@ -3037,11 +3160,11 @@
</member>
<member name="rendering/rendering_device/fallback_to_opengl3" type="bool" setter="" getter="" default="true">
If [code]true[/code], the forward renderer will fall back to OpenGL 3 if Direct3D 12, Metal, and Vulkan are not supported.
[b]Note:[/b] This setting is implemented only on Windows, Android, macOS, iOS, and Linux/X11.
[b]Note:[/b] This setting is implemented on Windows, Android, macOS, iOS, and Linux/X11.
</member>
<member name="rendering/rendering_device/fallback_to_vulkan" type="bool" setter="" getter="" default="true">
If [code]true[/code], the forward renderer will fall back to Vulkan if Direct3D 12 (on Windows) or Metal (on macOS x86_64) are not supported. The fallback is always attempted regardless of this setting if Direct3D 12 (Windows) or Metal (macOS) driver support was disabled at compile time.
[b]Note:[/b] This setting is implemented only on Windows and macOS.
[b]Note:[/b] This setting is implemented on Windows and macOS.
</member>
<member name="rendering/rendering_device/pipeline_cache/enable" type="bool" setter="" getter="" default="true">
Enable the pipeline cache that is saved to disk if the graphics API supports it.
@ -3210,7 +3333,7 @@
The ratio of [WorkerThreadPool]'s threads that will be reserved for low-priority tasks. For example, if 10 threads are available and this value is set to [code]0.3[/code], 3 of the worker threads will be reserved for low-priority tasks. The actual value won't exceed the number of CPU cores minus one, and if possible, at least one worker thread will be dedicated to low-priority tasks.
</member>
<member name="threading/worker_pool/max_threads" type="int" setter="" getter="" default="-1">
Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]-1[/code] means no limit.
Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]-1[/code] means [code]1[/code] on Web, or a number of [i]logical[/i] CPU cores available on other platforms (see [method OS.get_processor_count]).
</member>
<member name="xr/openxr/binding_modifiers/analog_threshold" type="bool" setter="" getter="" default="false">
If [code]true[/code], enables the analog threshold binding modifier if supported by the XR runtime.
@ -3245,11 +3368,11 @@
</member>
<member name="xr/openxr/extensions/hand_tracking_controller_data_source" type="bool" setter="" getter="" default="false">
If [code]true[/code], support for the controller inferred data source is requested. If supported, you will receive hand tracking data even if the user has a controller in hand, with finger positions automatically inferred from controller input and/or sensors.
[b]Node:[/b] This requires the OpenXR data source extension and controller inferred handtracking to be supported by the XR runtime. If not supported this setting will be ignored. [member xr/openxr/extensions/hand_tracking] must be enabled for this setting to be used.
[b]Note:[/b] This requires the OpenXR data source extension and controller inferred handtracking to be supported by the XR runtime. If not supported this setting will be ignored. [member xr/openxr/extensions/hand_tracking] must be enabled for this setting to be used.
</member>
<member name="xr/openxr/extensions/hand_tracking_unobstructed_data_source" type="bool" setter="" getter="" default="false">
If [code]true[/code], support for the unobstructed data source is requested. If supported, you will receive hand tracking data based on the actual finger positions of the user often determined by optical tracking.
[b]Node:[/b] This requires the OpenXR data source extension and unobstructed handtracking to be supported by the XR runtime. If not supported this setting will be ignored. [member xr/openxr/extensions/hand_tracking] must be enabled for this setting to be used.
[b]Note:[/b] This requires the OpenXR data source extension and unobstructed handtracking to be supported by the XR runtime. If not supported this setting will be ignored. [member xr/openxr/extensions/hand_tracking] must be enabled for this setting to be used.
</member>
<member name="xr/openxr/form_factor" type="int" setter="" getter="" default="&quot;0&quot;">
Specify whether OpenXR should be configured for an HMD or a hand held device.

View file

@ -207,7 +207,7 @@
<return type="int" />
<param index="0" name="for_pixel_width" type="int" />
<description>
Returns the number of pixels with the given pixel width displayed per meter, after this [Projection] is applied.
Returns [param for_pixel_width] divided by the viewport's width measured in meters on the near plane, after this [Projection] is applied.
</description>
</method>
<method name="get_projection_plane" qualifiers="const">

View file

@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
<member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="218">
<member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="232">
Optional override for the data format to return sampled values in. The corresponding [RDTextureFormat] must have had this added as a shareable format. The default value of [constant RenderingDevice.DATA_FORMAT_MAX] does not override the format.
</member>
<member name="swizzle_a" type="int" setter="set_swizzle_a" getter="get_swizzle_a" enum="RenderingDevice.TextureSwizzle" default="6">

View file

@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="218">
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="232">
The way that this attribute's data is interpreted when sent to a shader.
</member>
<member name="frequency" type="int" setter="set_frequency" getter="get_frequency" enum="RenderingDevice.VertexFrequency" default="0">

View file

@ -676,7 +676,7 @@
<method name="get_tracked_object_type_count" qualifiers="const">
<return type="int" />
<description>
Returns how many types of trackable objects are.
Returns how many types of trackable objects there are.
This is only used by Vulkan in debug builds. Godot must also be started with the [code]--extra-gpu-memory-tracking[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</description>
</method>
@ -1112,7 +1112,7 @@
<param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
<param index="2" name="creation_bits" type="int" enum="RenderingDevice.BufferCreationBits" is_bitfield="true" default="0" />
<description>
It can be accessed with the RID that is returned.
Creates a new vertex buffer. It can be accessed with the RID that is returned.
Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.
</description>
</method>
@ -1302,7 +1302,7 @@
8-bit-per-channel signed integer red/green/blue channel data format. Values are in the [code][-127, 127][/code] range.
</constant>
<constant name="DATA_FORMAT_R8G8B8_SRGB" value="28" enum="DataFormat">
8-bit-per-channel unsigned floating-point red/green/blue/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the [code][0.0, 1.0][/code] range.
8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the [code][0.0, 1.0][/code] range.
</constant>
<constant name="DATA_FORMAT_B8G8R8_UNORM" value="29" enum="DataFormat">
8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the [code][0.0, 1.0][/code] range.
@ -1871,7 +1871,35 @@
<constant name="DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM" value="217" enum="DataFormat">
16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the [code][0.0, 1.0][/code] range.
</constant>
<constant name="DATA_FORMAT_MAX" value="218" enum="DataFormat">
<constant name="DATA_FORMAT_ASTC_4x4_SFLOAT_BLOCK" value="218" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_5x4_SFLOAT_BLOCK" value="219" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_5x5_SFLOAT_BLOCK" value="220" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_6x5_SFLOAT_BLOCK" value="221" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_6x6_SFLOAT_BLOCK" value="222" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_8x5_SFLOAT_BLOCK" value="223" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_8x6_SFLOAT_BLOCK" value="224" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_8x8_SFLOAT_BLOCK" value="225" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_10x5_SFLOAT_BLOCK" value="226" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_10x6_SFLOAT_BLOCK" value="227" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_10x8_SFLOAT_BLOCK" value="228" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_10x10_SFLOAT_BLOCK" value="229" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_12x10_SFLOAT_BLOCK" value="230" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_ASTC_12x12_SFLOAT_BLOCK" value="231" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_MAX" value="232" enum="DataFormat">
Represents the size of the [enum DataFormat] enum.
</constant>
<constant name="BARRIER_MASK_VERTEX" value="1" enum="BarrierMask" is_bitfield="true">
@ -2451,6 +2479,12 @@
<constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT" value="2" enum="PipelineSpecializationConstantType">
Floating-point specialization constant.
</constant>
<constant name="SUPPORTS_METALFX_SPATIAL" value="3" enum="Features">
Support for MetalFX spatial upscaling.
</constant>
<constant name="SUPPORTS_METALFX_TEMPORAL" value="4" enum="Features">
Support for MetalFX temporal upscaling.
</constant>
<constant name="SUPPORTS_BUFFER_DEVICE_ADDRESS" value="6" enum="Features">
Features support for buffer device address extension.
</constant>

View file

@ -1259,6 +1259,7 @@
<param index="0" name="enable" type="bool" />
<description>
If [param enable] is [code]true[/code], enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to [member ProjectSettings.rendering/environment/glow/upscale_mode].
[b]Note:[/b] This setting is only effective when using the Forward+ or Mobile rendering methods, as Compatibility uses a different glow implementation.
</description>
</method>
<method name="environment_set_adjustment">
@ -1344,6 +1345,16 @@
Configures fog for the specified environment RID. See [code]fog_*[/code] properties in [Environment] for more information.
</description>
</method>
<method name="environment_set_fog_depth">
<return type="void" />
<param index="0" name="env" type="RID" />
<param index="1" name="curve" type="float" />
<param index="2" name="begin" type="float" />
<param index="3" name="end" type="float" />
<description>
Configures fog depth for the specified environment RID. Only has an effect when the fog mode of the environment is [constant ENV_FOG_MODE_DEPTH]. See [code]fog_depth_*[/code] properties in [Environment] for more information.
</description>
</method>
<method name="environment_set_glow">
<return type="void" />
<param index="0" name="env" type="RID" />
@ -4668,7 +4679,7 @@
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true">
Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
Flag used to mark that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
</constant>
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true">
Flag used to mark that the array uses 8 bone weights instead of 4.
@ -4806,7 +4817,7 @@
Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
</constant>
<constant name="LIGHT_PARAM_SHADOW_BIAS" value="15" enum="LightParam">
Bias the shadow lookup to fix self-shadowing artifacts.
Bias for the shadow lookup to fix self-shadowing artifacts.
</constant>
<constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="LightParam">
Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to [code]0[/code] turns off the pancaking effect.
@ -5021,17 +5032,17 @@
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
</constant>
<constant name="VIEWPORT_SCALING_3D_MODE_FSR" value="1" enum="ViewportScaling3DMode">
Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling.
Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling.
</constant>
<constant name="VIEWPORT_SCALING_3D_MODE_FSR2" value="2" enum="ViewportScaling3DMode">
Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR2. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] will use FSR2 at native resolution as a TAA solution.
Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in the viewport being upscaled using FSR2. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] will use FSR2 at native resolution as a TAA solution.
</constant>
<constant name="VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL" value="3" enum="ViewportScaling3DMode">
Use MetalFX spatial upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using MetalFX. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling.
Use MetalFX spatial upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in the viewport being upscaled using MetalFX. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling.
[b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
</constant>
<constant name="VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL" value="4" enum="ViewportScaling3DMode">
Use MetalFX temporal upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using MetalFX. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] will use MetalFX at native resolution as a TAA solution.
Use MetalFX temporal upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in the viewport being upscaled using MetalFX. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] will use MetalFX at native resolution as a TAA solution.
[b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
</constant>
<constant name="VIEWPORT_SCALING_3D_MODE_MAX" value="5" enum="ViewportScaling3DMode">
@ -5183,10 +5194,11 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_LIGHTING" value="2" enum="ViewportDebugDraw">
Objects are displayed with only light information.
[b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="3" enum="ViewportDebugDraw">
Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others.
[b]Note:[/b] When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore.
[b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="4" enum="ViewportDebugDraw">
Debug draw draws objects in wireframe.
@ -5196,13 +5208,16 @@
Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="ViewportDebugDraw">
Objects are displayed with only the albedo value from [VoxelGI]s.
Objects are displayed with only the albedo value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="ViewportDebugDraw">
Objects are displayed with only the lighting value from [VoxelGI]s.
Objects are displayed with only the lighting value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="ViewportDebugDraw">
Objects are displayed with only the emission color from [VoxelGI]s.
Objects are displayed with only the emission color from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw">
Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
@ -5214,51 +5229,67 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE" value="11" enum="ViewportDebugDraw">
Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure.
[b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw">
Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SSIL" value="13" enum="ViewportDebugDraw">
Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="14" enum="ViewportDebugDraw">
Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow.
Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order (from closest to furthest from the camera), they are colored red, green, blue, and yellow.
[b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
[b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw">
Draws the decal atlas that stores decal textures from [Decal]s.
[b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="16" enum="ViewportDebugDraw">
Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="17" enum="ViewportDebugDraw">
Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="18" enum="ViewportDebugDraw">
Draws the global illumination buffer ([VoxelGI] or SDFGI).
Draws the global illumination buffer from [VoxelGI] or SDFGI. Requires [VoxelGI] (at least one visible baked VoxelGI node) or SDFGI ([member Environment.sdfgi_enabled]) to be enabled to have a visible effect.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="19" enum="ViewportDebugDraw">
Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="ViewportDebugDraw">
Draws the [OmniLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="ViewportDebugDraw">
Draws the [SpotLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="ViewportDebugDraw">
Draws the [Decal] cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="ViewportDebugDraw">
Draws the [ReflectionProbe] cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw">
Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects.
[b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_MOTION_VECTORS" value="25" enum="ViewportDebugDraw">
Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay.
[b]Note:[/b] Only supported when using the Forward+ rendering method.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER" value="26" enum="ViewportDebugDraw">
Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects.
[b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
</constant>
<constant name="VIEWPORT_VRS_DISABLED" value="0" enum="ViewportVRSMode">
Variable rate shading is disabled.

View file

@ -50,6 +50,9 @@
<member name="language_support" type="Dictionary" setter="" getter="" default="{}">
Override the list of languages supported by this font. If left empty, this is supplied by the font metadata. There is usually no need to change this. See also [member script_support].
</member>
<member name="modulate_color_glyphs" type="bool" setter="" getter="" default="false">
If set to [code]true[/code], color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.
</member>
<member name="msdf_pixel_range" type="int" setter="" getter="" default="8">
The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, [member msdf_pixel_range] must be set to at least [i]twice[/i] the size of the largest font outline. The default [member msdf_pixel_range] value of [code]8[/code] allows outline sizes up to [code]4[/code] to look correct.
</member>

View file

@ -26,6 +26,13 @@
In order for this UID to be registered, you must call [method add_id] or [method set_id].
</description>
</method>
<method name="create_id_for_path">
<return type="int" />
<param index="0" name="path" type="String" />
<description>
Like [method create_id], but the UID is seeded with the provided [param path] and project name. UIDs generated for that path will be always the same within the current project.
</description>
</method>
<method name="get_id_path" qualifiers="const">
<return type="String" />
<param index="0" name="id" type="int" />

View file

@ -29,6 +29,7 @@
<param index="7" name="pad" type="bool" default="false" />
<param index="8" name="tooltip" type="String" default="&quot;&quot;" />
<param index="9" name="size_in_percent" type="bool" default="false" />
<param index="10" name="alt_text" type="String" default="&quot;&quot;" />
<description>
Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image.
If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
@ -36,6 +37,7 @@
[param key] is an optional identifier, that can be used to modify the image via [method update_image].
If [param pad] is set, and the image is smaller than the size specified by [param width] and [param height], the image padding is added to match the size instead of upscaling.
If [param size_in_percent] is set, [param width] and [param height] values are percentages of the control width instead of pixels.
[param alt_text] is used as the image description for assistive apps.
</description>
</method>
<method name="add_text">
@ -341,6 +343,7 @@
<param index="0" name="bgcolor" type="Color" />
<description>
Adds a [code skip-lint][bgcolor][/code] tag to the tag stack.
[b]Note:[/b] The background color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if background colors are placed on neighboring lines/columns, so consider setting those theme items to [code]0[/code] if you want to avoid this.
</description>
</method>
<method name="push_bold">
@ -400,6 +403,7 @@
<param index="0" name="fgcolor" type="Color" />
<description>
Adds a [code skip-lint][fgcolor][/code] tag to the tag stack.
[b]Note:[/b] The foreground color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if foreground colors are placed on neighboring lines/columns, so consider setting those theme items to [code]0[/code] if you want to avoid this.
</description>
</method>
<method name="push_font">
@ -515,8 +519,9 @@
<param index="0" name="columns" type="int" />
<param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
<param index="2" name="align_to_row" type="int" default="-1" />
<param index="3" name="name" type="String" default="&quot;&quot;" />
<description>
Adds a [code skip-lint][table=columns,inline_align][/code] tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells.
Adds a [code skip-lint][table=columns,inline_align][/code] tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells. [param name] is used as the table name for assistive apps.
</description>
</method>
<method name="push_underline">
@ -525,6 +530,12 @@
Adds a [code skip-lint][u][/code] tag to the tag stack.
</description>
</method>
<method name="reload_effects">
<return type="void" />
<description>
Reloads custom effects. Useful when [member custom_effects] is modified manually.
</description>
</method>
<method name="remove_paragraph">
<return type="bool" />
<param index="0" name="paragraph" type="int" />
@ -604,6 +615,14 @@
If [param expand] is [code]false[/code], the column will not contribute to the total ratio.
</description>
</method>
<method name="set_table_column_name">
<return type="void" />
<param index="0" name="column" type="int" />
<param index="1" name="name" type="String" />
<description>
Sets table column name for assistive apps.
</description>
</method>
<method name="update_image">
<return type="void" />
<param index="0" name="key" type="Variant" />
@ -626,6 +645,9 @@
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="3">
If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="autowrap_trim_flags" type="int" setter="set_autowrap_trim_flags" getter="get_autowrap_trim_flags" enum="TextServer.LineBreakFlag" is_bitfield="true" default="192">
Autowrap space trimming flags. See [constant TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info.
</member>
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
If [code]true[/code], the label uses BBCode formatting.
[b]Note:[/b] This only affects the contents of [member text], not the tag stack.
@ -647,6 +669,7 @@
<member name="fit_content" type="bool" setter="set_fit_content" getter="is_fit_content_enabled" default="false">
If [code]true[/code], the label's minimum size will be automatically updated to fit its content, matching the behavior of [Label].
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="hint_underlined" type="bool" setter="set_hint_underline" getter="is_hint_underlined" default="true">
If [code]true[/code], the label underlines hint tags such as [code skip-lint][hint=description]{text}[/hint][/code].
</member>
@ -855,10 +878,10 @@
The vertical separation of elements in a table.
</theme_item>
<theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3">
The horizontal padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection.
The horizontal padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection. To avoid any risk of neighboring highlights overlapping each other, set this to [code]0[/code] to disable padding.
</theme_item>
<theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3">
The vertical padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection.
The vertical padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection. To avoid any risk of neighboring highlights overlapping each other, set this to [code]0[/code] to disable padding.
</theme_item>
<theme_item name="bold_font" data_type="font" type="Font">
The font used for bold text.

View file

@ -10,6 +10,12 @@
<tutorials>
</tutorials>
<methods>
<method name="get_base_scene_state" qualifiers="const">
<return type="SceneState" />
<description>
Returns the [SceneState] of the scene that this scene inherits from, or [code]null[/code] if it doesn't inherit from any scene.
</description>
</method>
<method name="get_connection_binds" qualifiers="const">
<return type="Array" />
<param index="0" name="idx" type="int" />
@ -155,6 +161,12 @@
Returns the type of the node at [param idx].
</description>
</method>
<method name="get_path" qualifiers="const">
<return type="String" />
<description>
Returns the resource path to the represented [PackedScene].
</description>
</method>
<method name="is_node_instance_placeholder" qualifiers="const">
<return type="bool" />
<param index="0" name="idx" type="int" />

View file

@ -58,6 +58,7 @@
1. The current scene node is immediately removed from the tree. From that point, [method Node.get_tree] called on the current (outgoing) scene will return [code]null[/code]. [member current_scene] will be [code]null[/code], too, because the new scene is not available yet.
2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. [method Node.get_tree] and [member current_scene] will be back to working as usual.
This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to [method Node.queue_free].
If you want to reliably access the new scene, await the [signal scene_changed] signal.
</description>
</method>
<method name="create_timer">
@ -151,6 +152,18 @@
Returns [code]true[/code] if a node added to the given group [param name] exists in the tree.
</description>
</method>
<method name="is_accessibility_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if accessibility features are enabled, and accessibility information updates are actively processed.
</description>
</method>
<method name="is_accessibility_supported" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if accessibility features are supported by the OS and enabled in project settings.
</description>
</method>
<method name="notify_group">
<return type="void" />
<param index="0" name="group" type="StringName" />
@ -265,8 +278,9 @@
- Depending on each node's [member Node.process_mode], their [method Node._process], [method Node._physics_process] and [method Node._input] callback methods may not called anymore.
</member>
<member name="physics_interpolation" type="bool" setter="set_physics_interpolation_enabled" getter="is_physics_interpolation_enabled" default="false">
If [code]true[/code], the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames.
If [code]true[/code], the renderer will interpolate the transforms of objects (both physics and non-physics) between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames.
The default value of this property is controlled by [member ProjectSettings.physics/common/physics_interpolation].
[b]Note:[/b] Although this is a global setting, finer control of individual branches of the [SceneTree] is possible using [member Node.physics_interpolation_mode].
</member>
<member name="quit_on_go_back" type="bool" setter="set_quit_on_go_back" getter="is_quit_on_go_back" default="true">
If [code]true[/code], the application quits automatically when navigating back (e.g. using the system "Back" button on Android).
@ -312,6 +326,17 @@
Emitted immediately before [method Node._process] is called on every node in this tree.
</description>
</signal>
<signal name="scene_changed">
<description>
Emitted after the new scene is added to scene tree and initialized. Can be used to reliably access [member current_scene] when changing scenes.
[codeblock]
# This code should be inside an autoload.
get_tree().change_scene_to_file(other_scene_path)
await get_tree().scene_changed
print(get_tree().current_scene) # Prints the new scene.
[/codeblock]
</description>
</signal>
<signal name="tree_changed">
<description>
Emitted any time the tree's hierarchy changes (nodes being moved, renamed, etc.).

View file

@ -15,5 +15,7 @@
</constant>
<constant name="SCRIPT_NAME_CASING_KEBAB_CASE" value="3" enum="ScriptNameCasing">
</constant>
<constant name="SCRIPT_NAME_CASING_CAMEL_CASE" value="4" enum="ScriptNameCasing">
</constant>
</constants>
</class>

View file

@ -12,6 +12,7 @@
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
<member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.0" />
</members>
<signals>

View file

@ -24,6 +24,128 @@
delegate void ItemDroppedEventHandler(string itemName, int amount);
[/csharp]
[/codeblocks]
Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach.
[codeblocks]
[gdscript]
func _ready():
var button = Button.new()
# `button_down` here is a Signal Variant type. We therefore call the Signal.connect() method, not Object.connect().
# See discussion below for a more in-depth overview of the API.
button.button_down.connect(_on_button_down)
# This assumes that a `Player` class exists, which defines a `hit` signal.
var player = Player.new()
# We use Signal.connect() again, and we also use the Callable.bind() method,
# which returns a new Callable with the parameter binds.
player.hit.connect(_on_player_hit.bind("sword", 100))
func _on_button_down():
print("Button down!")
func _on_player_hit(weapon_type, damage):
print("Hit with weapon %s for %d damage." % [weapon_type, damage])
[/gdscript]
[csharp]
public override void _Ready()
{
var button = new Button();
// C# supports passing signals as events, so we can use this idiomatic construct:
button.ButtonDown += OnButtonDown;
// This assumes that a `Player` class exists, which defines a `Hit` signal.
var player = new Player();
// We can use lambdas when we need to bind additional parameters.
player.Hit += () =&gt; OnPlayerHit("sword", 100);
}
private void OnButtonDown()
{
GD.Print("Button down!");
}
private void OnPlayerHit(string weaponType, int damage)
{
GD.Print($"Hit with weapon {weaponType} for {damage} damage.");
}
[/csharp]
[/codeblocks]
[b][code skip-lint]Object.connect()[/code] or [code skip-lint]Signal.connect()[/code]?[/b]
As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one.
[codeblocks]
[gdscript]
func _ready():
var button = Button.new()
# Option 1: Object.connect() with an implicit Callable for the defined function.
button.connect("button_down", _on_button_down)
# Option 2: Object.connect() with a constructed Callable using a target object and method name.
button.connect("button_down", Callable(self, "_on_button_down"))
# Option 3: Signal.connect() with an implicit Callable for the defined function.
button.button_down.connect(_on_button_down)
# Option 4: Signal.connect() with a constructed Callable using a target object and method name.
button.button_down.connect(Callable(self, "_on_button_down"))
func _on_button_down():
print("Button down!")
[/gdscript]
[csharp]
public override void _Ready()
{
var button = new Button();
// Option 1: In C#, we can use signals as events and connect with this idiomatic syntax:
button.ButtonDown += OnButtonDown;
// Option 2: GodotObject.Connect() with a constructed Callable from a method group.
button.Connect(Button.SignalName.ButtonDown, Callable.From(OnButtonDown));
// Option 3: GodotObject.Connect() with a constructed Callable using a target object and method name.
button.Connect(Button.SignalName.ButtonDown, new Callable(this, MethodName.OnButtonDown));
}
private void OnButtonDown()
{
GD.Print("Button down!");
}
[/csharp]
[/codeblocks]
While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), [b]option 3[/b] offers the best validation: it will print a compile-time error if either the [code]button_down[/code] [Signal] or the [code]_on_button_down[/code] [Callable] are not defined. On the other hand, [b]option 2[/b] only relies on string names and will only be able to validate either names at runtime: it will generate an error at runtime if [code]"button_down"[/code] is not a signal, or if [code]"_on_button_down"[/code] is not a method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
[b]Binding and passing parameters:[/b]
The syntax to bind parameters is through [method Callable.bind], which returns a copy of the [Callable] with its parameters bound.
When calling [method emit] or [method Object.emit_signal], the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters.
[codeblocks]
[gdscript]
func _ready():
# This assumes that a `Player` class exists, which defines a `hit` signal.
var player = Player.new()
# Using Callable.bind().
player.hit.connect(_on_player_hit.bind("sword", 100))
# Parameters added when emitting the signal are passed first.
player.hit.emit("Dark lord", 5)
# We pass two arguments when emitting (`hit_by`, `level`),
# and bind two more arguments when connecting (`weapon_type`, `damage`).
func _on_player_hit(hit_by, level, weapon_type, damage):
print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage])
[/gdscript]
[csharp]
public override void _Ready()
{
// This assumes that a `Player` class exists, which defines a `Hit` signal.
var player = new Player();
// Using lambda expressions that create a closure that captures the additional parameters.
// The lambda only receives the parameters defined by the signal's delegate.
player.Hit += (hitBy, level) =&gt; OnPlayerHit(hitBy, level, "sword", 100);
// Parameters added when emitting the signal are passed first.
player.EmitSignal(SignalName.Hit, "Dark lord", 5);
}
// We pass two arguments when emitting (`hit_by`, `level`),
// and bind two more arguments when connecting (`weapon_type`, `damage`).
private void OnPlayerHit(string hitBy, int level, string weaponType, int damage)
{
GD.Print($"Hit by {hitBy} (level {level}) with weapon {weaponType} for {damage} damage.");
}
[/csharp]
[/codeblocks]
</description>
<tutorials>
<link title="Using Signals">$DOCS_URL/getting_started/step_by_step/signals.html</link>
@ -59,7 +181,7 @@
<param index="1" name="flags" type="int" default="0" />
<description>
Connects this signal to the specified [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum Object.ConnectFlags] constants). You can provide additional arguments to the connected [param callable] by using [method Callable.bind].
A signal can only be connected once to the same [Callable]. If the signal is already connected, returns [constant ERR_INVALID_PARAMETER] and pushes an error message, unless the signal is connected with [constant Object.CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.
A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and generates an error, unless the signal is connected with [constant Object.CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.
[codeblock]
for button in $Buttons.get_children():
button.pressed.connect(_on_pressed.bind(button))
@ -67,6 +189,7 @@
func _on_pressed(button):
print(button.name, " was pressed")
[/codeblock]
[b]Note:[/b] If the [param callable]'s object is freed, the connection will be lost.
</description>
</method>
<method name="disconnect">

View file

@ -20,6 +20,14 @@
[b]Note:[/b] Bone names should be unique, non empty, and cannot include the [code]:[/code] and [code]/[/code] characters.
</description>
</method>
<method name="advance">
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
Manually advance the child [SkeletonModifier3D]s by the specified time (in seconds).
[b]Note:[/b] The [param delta] is temporarily accumulated in the [Skeleton3D], and the deferred process uses the accumulated value to process the modification.
</description>
</method>
<method name="clear_bones">
<return type="void" />
<description>
@ -104,14 +112,14 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="key" type="StringName" />
<description>
Returns bone metadata for [param bone_idx] with [param key].
Returns the metadata for the bone at index [param bone_idx] with [param key].
</description>
</method>
<method name="get_bone_meta_list" qualifiers="const">
<return type="StringName[]" />
<param index="0" name="bone_idx" type="int" />
<description>
Returns a list of all metadata keys for [param bone_idx].
Returns the list of all metadata keys for the bone at index [param bone_idx].
</description>
</method>
<method name="get_bone_name" qualifiers="const">
@ -191,7 +199,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="key" type="StringName" />
<description>
Returns whether there exists any bone metadata for [param bone_idx] with key [param key].
Returns [code]true[/code] if the bone at index [param bone_idx] has metadata with the key [param key].
</description>
</method>
<method name="is_bone_enabled" qualifiers="const">
@ -292,7 +300,7 @@
<param index="1" name="key" type="StringName" />
<param index="2" name="value" type="Variant" />
<description>
Sets bone metadata for [param bone_idx], will set the [param key] meta to [param value].
Sets the metadata for the bone at index [param bone_idx], setting the [param key] meta to [param value].
</description>
</method>
<method name="set_bone_name">
@ -420,5 +428,8 @@
<constant name="MODIFIER_CALLBACK_MODE_PROCESS_IDLE" value="1" enum="ModifierCallbackModeProcess">
Set a flag to process modification during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
</constant>
<constant name="MODIFIER_CALLBACK_MODE_PROCESS_MANUAL" value="2" enum="ModifierCallbackModeProcess">
Do not process modification. Use [method advance] to process the modification manually.
</constant>
</constants>
</class>

Some files were not shown because too many files have changed in this diff Show more