From ac9799ea2dafa6e4335e9340b42d5cce6434825c Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 20 Sep 2025 03:22:45 +0000 Subject: [PATCH] classref: Sync with current master branch (d7382aa) --- classes/class_@gdscript.rst | 2 + classes/class_array.rst | 10 ++- classes/class_audiostream.rst | 68 +++++++++---------- classes/class_audiostreamplayback.rst | 16 ++--- classes/class_basematerial3d.rst | 2 + classes/class_basis.rst | 2 +- classes/class_cameraattributespractical.rst | 4 ++ classes/class_characterbody2d.rst | 4 ++ classes/class_characterbody3d.rst | 4 ++ classes/class_collisionpolygon2d.rst | 2 +- classes/class_collisionpolygon3d.rst | 2 +- classes/class_collisionshape2d.rst | 2 +- classes/class_collisionshape3d.rst | 2 +- classes/class_control.rst | 2 +- classes/class_dictionary.rst | 41 ++++++++++- classes/class_editorinterface.rst | 56 +++++++++++++++ .../class_editorresourcepreviewgenerator.rst | 8 +-- classes/class_editorsceneformatimporter.rst | 8 +-- classes/class_editorsettings.rst | 14 ---- classes/class_environment.rst | 2 + classes/class_image.rst | 6 +- classes/class_light3d.rst | 2 + classes/class_projectsettings.rst | 2 +- classes/class_resourceformatloader.rst | 48 ++++++------- classes/class_videostream.rst | 8 +-- classes/class_viewport.rst | 2 + 26 files changed, 215 insertions(+), 104 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 9491dcf8f..4a71cef3f 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -121,6 +121,8 @@ Positive floating-point infinity. This is the result of floating-point division ---- +.. rst-class:: classref-descriptions-group + Annotations ----------- diff --git a/classes/class_array.rst b/classes/class_array.rst index 7e85ad4b3..fae14cb1f 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -17,7 +17,7 @@ A built-in data structure that holds a sequence of elements. Description ----------- -An array data structure that can contain a sequence of elements of any :ref:`Variant` type. Elements are accessed by a numerical index starting at ``0``. Negative indices are used to count from the back (``-1`` is the last element, ``-2`` is the second to last, etc.). +An array data structure that can contain a sequence of elements of any :ref:`Variant` type by default. Values can optionally be constrained to a specific type by creating a *typed array*. Elements are accessed by a numerical index starting at ``0``. Negative indices are used to count from the back (``-1`` is the last element, ``-2`` is the second to last, etc.). .. tabs:: @@ -33,6 +33,10 @@ An array data structure that can contain a sequence of elements of any :ref:`Var print(array[1]) # Prints "Second" print(array[-3]) # Prints "Second" + # This typed array can only contain integers. + # Attempting to add any other type will result in an error. + var typed_array: Array[int] = [1, 2, 3] + .. code-tab:: csharp Godot.Collections.Array array = ["First", 2, 3, "Last"]; @@ -44,6 +48,10 @@ An array data structure that can contain a sequence of elements of any :ref:`Var GD.Print(array[1]); // Prints "Second" GD.Print(array[^3]); // Prints "Second" + // This typed array can only contain integers. + // Attempting to add any other type will result in an error. + Godot.Collections.Array>int< typedArray = [1, 2, 3]; + \ **Note:** Arrays are always passed by **reference**. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate()`. diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 13e2d2d78..584198bdd 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -44,39 +44,39 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_bar_beats`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_beat_count`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_bpm`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_length`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_parameter_list`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_tags`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_loop`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_monophonic`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_be_sampled`\ (\ ) |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioSample` | :ref:`generate_sample`\ (\ ) |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_length`\ (\ ) |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback`\ (\ ) | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_meta_stream`\ (\ ) |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_monophonic`\ (\ ) |const| | - +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_bar_beats`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_beat_count`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_bpm`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_length`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_parameter_list`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_tags`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_loop`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |required| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_monophonic`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_be_sampled`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioSample` | :ref:`generate_sample`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_length`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_meta_stream`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_monophonic`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -210,7 +210,7 @@ Override this method to return ``true`` if this stream has a loop. .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |required| |const| :ref:`🔗` Override this method to customize the returned value of :ref:`instantiate_playback()`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index c368a9629..1867220cc 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -43,9 +43,9 @@ Methods +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | + | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |required| |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |required| |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| |required| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -53,9 +53,9 @@ Methods +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | + | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| |required| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_stop`\ (\ ) |virtual| | + | |void| | :ref:`_stop`\ (\ ) |virtual| |required| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -115,7 +115,7 @@ Return the current value of a playback parameter by name (see :ref:`AudioStream. .. rst-class:: classref-method -:ref:`float` **_get_playback_position**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_get_playback_position**\ (\ ) |virtual| |required| |const| :ref:`🔗` Overridable method. Should return the current progress along the audio stream, in seconds. @@ -127,7 +127,7 @@ Overridable method. Should return the current progress along the audio stream, i .. rst-class:: classref-method -:ref:`bool` **_is_playing**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_is_playing**\ (\ ) |virtual| |required| |const| :ref:`🔗` Overridable method. Should return ``true`` if this playback is active and playing its audio stream. @@ -177,7 +177,7 @@ Set the current value of a playback parameter by name (see :ref:`AudioStream._ge .. rst-class:: classref-method -|void| **_start**\ (\ from_pos\: :ref:`float`\ ) |virtual| :ref:`🔗` +|void| **_start**\ (\ from_pos\: :ref:`float`\ ) |virtual| |required| :ref:`🔗` Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play()`. @@ -189,7 +189,7 @@ Override this method to customize what happens when the playback starts at the g .. rst-class:: classref-method -|void| **_stop**\ (\ ) |virtual| :ref:`🔗` +|void| **_stop**\ (\ ) |virtual| |required| :ref:`🔗` Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop()`. diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 3e96976fe..4d164e805 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -3437,6 +3437,8 @@ The stencil reference value (0-255). Typically a power of 2. If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality`. +\ **Note:** Subsurface scattering is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg` is ``true``). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 120a74eba..b2cc9b740 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -377,7 +377,7 @@ Returns the `determinant `__ of this - If the determinant is a negative number, the basis represents a negative scale. -\ **Note:** If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2. +\ **Note:** If the basis's scale is the same for every axis, its determinant is always that scale by the power of 3. .. rst-class:: classref-item-separator diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index 353445209..1f9aef6c3 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -143,6 +143,8 @@ Enables depth of field blur for objects further than :ref:`dof_blur_far_distance \ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** Depth of field blur is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg` is ``true``). + .. rst-class:: classref-item-separator ---- @@ -196,6 +198,8 @@ Enables depth of field blur for objects closer than :ref:`dof_blur_near_distance \ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** Depth of field blur is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg` is ``true``). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 659ba422d..98bbeab10 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -446,6 +446,8 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide()`. +This property should not be set to a value multiplied by ``delta``, because this happens internally in :ref:`move_and_slide()`. Otherwise, the simulation will run at an incorrect speed. + .. rst-class:: classref-item-separator ---- @@ -709,6 +711,8 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a **CharacterBody2D** or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +This method should be used in :ref:`Node._physics_process()` (or in a method called by :ref:`Node._physics_process()`), as it uses the physics step's ``delta`` value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. + Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 1e6fa9f5e..364563cef 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -450,6 +450,8 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide()`. +This property should not be set to a value multiplied by ``delta``, because this happens internally in :ref:`move_and_slide()`. Otherwise, the simulation will run at an incorrect speed. + .. rst-class:: classref-item-separator ---- @@ -704,6 +706,8 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a **CharacterBody3D** or :ref:`RigidBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +This method should be used in :ref:`Node._physics_process()` (or in a method called by :ref:`Node._physics_process()`), as it uses the physics step's ``delta`` value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. + Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index a2c2a365c..989cc2845 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -19,7 +19,7 @@ A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D`, turn :ref:`PhysicsBody2D` into a solid object, or give a hollow shape to a :ref:`StaticBody2D`. +A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows it to be edited. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D`, turn a :ref:`PhysicsBody2D` into a solid object, or give a hollow shape to a :ref:`StaticBody2D`. \ **Warning:** A non-uniformly scaled **CollisionPolygon2D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its polygon instead. diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 42caaaafc..404587f8e 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -19,7 +19,7 @@ A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObj Description ----------- -A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area3D` or turn :ref:`PhysicsBody3D` into a solid object. +A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D` parent and allows it to be edited. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area3D` or turn a :ref:`PhysicsBody3D` into a solid object. \ **Warning:** A non-uniformly scaled :ref:`CollisionShape3D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 8a790e331..a99ea414d 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -19,7 +19,7 @@ A node that provides a :ref:`Shape2D` to a :ref:`CollisionObject2 Description ----------- -A node that provides a :ref:`Shape2D` to a :ref:`CollisionObject2D` parent and allows to edit it. This can give a detection shape to an :ref:`Area2D` or turn a :ref:`PhysicsBody2D` into a solid object. +A node that provides a :ref:`Shape2D` to a :ref:`CollisionObject2D` parent and allows it to be edited. This can give a detection shape to an :ref:`Area2D` or turn a :ref:`PhysicsBody2D` into a solid object. .. rst-class:: classref-introduction-group diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index fd5726c14..77e66abc3 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -19,7 +19,7 @@ A node that provides a :ref:`Shape3D` to a :ref:`CollisionObject3 Description ----------- -A node that provides a :ref:`Shape3D` to a :ref:`CollisionObject3D` parent and allows to edit it. This can give a detection shape to an :ref:`Area3D` or turn a :ref:`PhysicsBody3D` into a solid object. +A node that provides a :ref:`Shape3D` to a :ref:`CollisionObject3D` parent and allows it to be edited. This can give a detection shape to an :ref:`Area3D` or turn a :ref:`PhysicsBody3D` into a solid object. \ **Warning:** A non-uniformly scaled **CollisionShape3D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its :ref:`shape` resource instead. diff --git a/classes/class_control.rst b/classes/class_control.rst index e4ca9c911..e8b7006ee 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -2521,7 +2521,7 @@ The returned node will be added as child to a :ref:`PopupPanel -\ **Example:** Usa a scene instance as a tooltip: +\ **Example:** Use a scene instance as a tooltip: .. tabs:: diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 8ec473bfe..65fcf41cd 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -134,7 +134,7 @@ To add a key to an existing dictionary, access it like an existing key and assig -Finally, dictionaries can contain different types of keys and values in the same dictionary: +Finally, untyped dictionaries can contain different types of keys and values in the same dictionary: .. tabs:: @@ -185,6 +185,45 @@ The keys of a dictionary can be iterated with the ``for`` keyword: +To enforce a certain type for keys and values, you can create a *typed dictionary*. Typed dictionaries can only contain keys and values of the given types, or that inherit from the given classes: + + +.. tabs:: + + .. code-tab:: gdscript + + # Creates a typed dictionary with String keys and int values. + # Attempting to use any other type for keys or values will result in an error. + var typed_dict: Dictionary[String, int] = { + "some_key": 1, + "some_other_key": 2, + } + + # Creates a typed dictionary with String keys and values of any type. + # Attempting to use any other type for keys will result in an error. + var typed_dict_key_only: Dictionary[String, Variant] = { + "some_key": 12.34, + "some_other_key": "string", + } + + .. code-tab:: csharp + + // Creates a typed dictionary with String keys and int values. + // Attempting to use any other type for keys or values will result in an error. + var typedDict = new Godot.Collections.Dictionary { + {"some_key", 1}, + {"some_other_key", 2}, + }; + + // Creates a typed dictionary with String keys and values of any type. + // Attempting to use any other type for keys will result in an error. + var typedDictKeyOnly = new Godot.Collections.Dictionary { + {"some_key", 12.34}, + {"some_other_key", "string"}, + }; + + + \ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate()`. \ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 6ab1f050b..6840ff95d 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -102,6 +102,12 @@ Methods +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_node_3d_rotate_snap`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_node_3d_scale_snap`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_node_3d_translate_snap`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Node`\] | :ref:`get_open_scene_roots`\ (\ ) |const| | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | @@ -122,6 +128,8 @@ Methods +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_node_3d_snap_enabled`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | @@ -497,6 +505,42 @@ Returns the editor's :ref:`EditorInspector` instance. ---- +.. _class_EditorInterface_method_get_node_3d_rotate_snap: + +.. rst-class:: classref-method + +:ref:`float` **get_node_3d_rotate_snap**\ (\ ) |const| :ref:`🔗` + +Returns the amount of degrees the 3D editor's rotational snapping is set to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_node_3d_scale_snap: + +.. rst-class:: classref-method + +:ref:`float` **get_node_3d_scale_snap**\ (\ ) |const| :ref:`🔗` + +Returns the amount of units the 3D editor's scale snapping is set to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_node_3d_translate_snap: + +.. rst-class:: classref-method + +:ref:`float` **get_node_3d_translate_snap**\ (\ ) |const| :ref:`🔗` + +Returns the amount of units the 3D editor's translation snapping is set to. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_get_open_scene_roots: .. rst-class:: classref-method @@ -625,6 +669,18 @@ Returns ``true`` if multiple window support is enabled in the editor. Multiple w ---- +.. _class_EditorInterface_method_is_node_3d_snap_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_node_3d_snap_enabled**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if the 3D editor currently has snapping mode enabled, and ``false`` otherwise. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_is_playing_scene: .. rst-class:: classref-method diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index a7a2a1787..991002db1 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -32,13 +32,13 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_can_generate_small_preview`\ (\ ) |virtual| |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_generate`\ (\ resource\: :ref:`Resource`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |const| | + | :ref:`Texture2D` | :ref:`_generate`\ (\ resource\: :ref:`Resource`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |required| |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`_generate_from_path`\ (\ path\: :ref:`String`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_generate_small_preview_automatically`\ (\ ) |virtual| |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles`\ (\ type\: :ref:`String`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_handles`\ (\ type\: :ref:`String`\ ) |virtual| |required| |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ By default, it returns ``false``. .. rst-class:: classref-method -:ref:`Texture2D` **_generate**\ (\ resource\: :ref:`Resource`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |const| :ref:`🔗` +:ref:`Texture2D` **_generate**\ (\ resource\: :ref:`Resource`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |required| |const| :ref:`🔗` Generate a preview from a given resource with the specified size. This must always be implemented. @@ -118,7 +118,7 @@ By default, it returns ``false``. .. rst-class:: classref-method -:ref:`bool` **_handles**\ (\ type\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_handles**\ (\ type\: :ref:`String`\ ) |virtual| |required| |const| :ref:`🔗` Returns ``true`` if your generator supports the resource of type ``type``. diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index ce7cbb9cf..06cc0442e 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -34,13 +34,13 @@ Methods :widths: auto +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_extensions`\ (\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_extensions`\ (\ ) |virtual| |required| |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_get_import_options`\ (\ path\: :ref:`String`\ ) |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_option_visibility`\ (\ path\: :ref:`String`, for_animation\: :ref:`bool`, option\: :ref:`String`\ ) |virtual| |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_import_scene`\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| | + | :ref:`Object` | :ref:`_import_scene`\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| |required| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_import_option`\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -153,7 +153,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_extensions**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`PackedStringArray` **_get_extensions**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return supported file extensions for this scene importer. @@ -193,7 +193,7 @@ Should return ``true`` to show the given option, ``false`` to hide the given opt .. rst-class:: classref-method -:ref:`Object` **_import_scene**\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| :ref:`🔗` +:ref:`Object` **_import_scene**\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| |required| :ref:`🔗` Perform the bulk of the scene import logic here, for example using :ref:`GLTFDocument` or :ref:`FBXDocument`. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 51f383636..ef4e385ee 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -299,8 +299,6 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/unset` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/grid_map/palette_min_width` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/grid_map/pick_distance` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/grid_map/preview_size` | @@ -2505,18 +2503,6 @@ The modulate color to use for "past" frames displayed in the animation editor's ---- -.. _class_EditorSettings_property_editors/grid_map/palette_min_width: - -.. rst-class:: classref-property - -:ref:`int` **editors/grid_map/palette_min_width** :ref:`🔗` - -Minimum width of GridMap's mesh palette side panel. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_editors/grid_map/pick_distance: .. rst-class:: classref-property diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 0fc75ba90..34be13621 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -1989,6 +1989,8 @@ If ``true``, screen-space reflections are enabled. Screen-space reflections are \ **Note:** SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility. +\ **Note:** SSR is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg` is ``true``). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_image.rst b/classes/class_image.rst index 0247200bc..2b6a6c794 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -633,7 +633,7 @@ enum **AlphaMode**: :ref:`🔗` :ref:`AlphaMode` **ALPHA_NONE** = ``0`` -Image does not have alpha. +Image is fully opaque. It does not store alpha data. .. _class_Image_constant_ALPHA_BIT: @@ -641,7 +641,7 @@ Image does not have alpha. :ref:`AlphaMode` **ALPHA_BIT** = ``1`` -Image stores alpha in a single bit. +Image stores either fully opaque or fully transparent pixels. Also known as punchthrough alpha. .. _class_Image_constant_ALPHA_BLEND: @@ -649,7 +649,7 @@ Image stores alpha in a single bit. :ref:`AlphaMode` **ALPHA_BLEND** = ``2`` -Image uses alpha. +Image stores alpha data with values varying between ``0.0`` and ``1.0``. .. rst-class:: classref-item-separator diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index e2f9ebc6a..9946f664e 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -515,6 +515,8 @@ The light's color in the nonlinear sRGB color space. An *overbright* color can b The light will affect objects in the selected layers. +\ **Note:** The light cull mask is ignored by :ref:`VoxelGI`, SDFGI, :ref:`LightmapGI`, and volumetric fog. These will always render lights in a way that ignores the cull mask. See also :ref:`VisualInstance3D.layers`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index fff1f8346..1e8f2783e 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -4924,7 +4924,7 @@ If ``true``, subwindows are embedded in the main window (this is also called sin If ``false``, subwindows are created as separate windows (this is also called multi-window mode). This allows them to be moved outside the main window and use native operating system window decorations. -This is equivalent to :ref:`EditorSettings.interface/editor/single_window_mode` in the editor, except the setting's value is inverted. +This is equivalent to :ref:`EditorSettings.interface/editor/single_window_mode` in the editor. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 800532ba9..9b416ddb9 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -33,29 +33,29 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_exists`\ (\ path\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_classes_used`\ (\ path\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_dependencies`\ (\ path\: :ref:`String`, add_types\: :ref:`bool`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_resource_script_class`\ (\ path\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_resource_type`\ (\ path\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_resource_uid`\ (\ path\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles_type`\ (\ type\: :ref:`StringName`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_load`\ (\ path\: :ref:`String`, original_path\: :ref:`String`, use_sub_threads\: :ref:`bool`, cache_mode\: :ref:`int`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_recognize_path`\ (\ path\: :ref:`String`, type\: :ref:`StringName`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_rename_dependencies`\ (\ path\: :ref:`String`, renames\: :ref:`Dictionary`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_exists`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_classes_used`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_dependencies`\ (\ path\: :ref:`String`, add_types\: :ref:`bool`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions`\ (\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_script_class`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_type`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_resource_uid`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_type`\ (\ type\: :ref:`StringName`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_load`\ (\ path\: :ref:`String`, original_path\: :ref:`String`, use_sub_threads\: :ref:`bool`, cache_mode\: :ref:`int`\ ) |virtual| |required| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize_path`\ (\ path\: :ref:`String`, type\: :ref:`StringName`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_rename_dependencies`\ (\ path\: :ref:`String`, renames\: :ref:`Dictionary`\ ) |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -247,7 +247,7 @@ Tells which resource class this loader can load. .. rst-class:: classref-method -:ref:`Variant` **_load**\ (\ path\: :ref:`String`, original_path\: :ref:`String`, use_sub_threads\: :ref:`bool`, cache_mode\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` +:ref:`Variant` **_load**\ (\ path\: :ref:`String`, original_path\: :ref:`String`, use_sub_threads\: :ref:`bool`, cache_mode\: :ref:`int`\ ) |virtual| |required| |const| :ref:`🔗` Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, ``original_path`` will target the source file. Returns a :ref:`Resource` object on success, or an :ref:`Error` constant in case of failure. diff --git a/classes/class_videostream.rst b/classes/class_videostream.rst index c5a83dae1..2d13a5efa 100644 --- a/classes/class_videostream.rst +++ b/classes/class_videostream.rst @@ -52,9 +52,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ - | :ref:`VideoStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`VideoStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |required| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -93,7 +93,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`VideoStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| :ref:`🔗` +:ref:`VideoStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |required| :ref:`🔗` Called when the video starts playing, to initialize and return a subclass of :ref:`VideoStreamPlayback`. diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index fb4053b8b..f64f21212 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -1930,6 +1930,8 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren If ``true``, the viewport should render its background as transparent. +\ **Note:** Due to technical limitations, certain rendering features are disabled when a viewport has a transparent background. This currently applies to screen-space reflections, subsurface scattering, and depth of field. + .. rst-class:: classref-item-separator ----