diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/BaseButton.xml | 3 | ||||
-rw-r--r-- | doc/classes/Control.xml | 4 | ||||
-rw-r--r-- | doc/classes/DynamicFont.xml | 8 | ||||
-rw-r--r-- | doc/classes/EditorFileSystem.xml | 1 | ||||
-rw-r--r-- | doc/classes/EditorFileSystemDirectory.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorImportPlugin.xml | 12 | ||||
-rw-r--r-- | doc/classes/EditorInspector.xml | 15 | ||||
-rw-r--r-- | doc/classes/EditorInterface.xml | 26 | ||||
-rw-r--r-- | doc/classes/EditorNode3DGizmo.xml | 9 | ||||
-rw-r--r-- | doc/classes/EditorNode3DGizmoPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorProperty.xml | 14 | ||||
-rw-r--r-- | doc/classes/EditorSettings.xml | 33 | ||||
-rw-r--r-- | doc/classes/HTTPClient.xml | 1 | ||||
-rw-r--r-- | doc/classes/HTTPRequest.xml | 1 | ||||
-rw-r--r-- | doc/classes/OS.xml | 13 | ||||
-rw-r--r-- | doc/classes/RigidBody3D.xml | 7 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 5 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 5 | ||||
-rw-r--r-- | doc/classes/VisibilityEnabler2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/VisibilityEnabler3D.xml | 3 | ||||
-rw-r--r-- | doc/classes/VisibilityNotifier2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/VisibilityNotifier3D.xml | 3 |
22 files changed, 135 insertions, 38 deletions
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 5e908b0e53..3812b45b13 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -13,7 +13,7 @@ <return type="void"> </return> <description> - Called when the button is pressed. + Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead. </description> </method> <method name="_toggled" qualifiers="virtual"> @@ -89,6 +89,7 @@ <signal name="pressed"> <description> Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise. + If you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead. </description> </signal> <signal name="toggled"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 9dbb843902..1f495bf91a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -856,7 +856,9 @@ The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. </member> <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> - The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. + The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. + [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. + [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. </member> <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 0864c3ba36..24df056c6b 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -26,6 +26,14 @@ Adds a fallback font. </description> </method> + <method name="get_available_chars" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns a string containing all the characters available in the main and all the fallback fonts. + If a given character is included in more than one font, it appears only once in the returned string. + </description> + </method> <method name="get_fallback" qualifiers="const"> <return type="DynamicFontData"> </return> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 9bb51af2d0..5461dccd27 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -97,6 +97,7 @@ <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> + Emitted if at least one resource is reloaded when the filesystem is scanned. </description> </signal> <signal name="sources_changed"> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index 096fe5df8f..b852ae1063 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -67,6 +67,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_script_class_name" qualifiers="const"> @@ -75,6 +76,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_type" qualifiers="const"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 0aac59c727..ea2dfae9a5 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -83,6 +83,16 @@ <argument index="1" name="options" type="Dictionary"> </argument> <description> + This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: + [codeblock] + func get_option_visibility(option, options): + # Only show the lossy quality setting if the compression mode is set to "Lossy". + if option == "compress/lossy_quality" and options.has("compress/mode"): + return int(options["compress/mode"]) == COMPRESS_LOSSY + + return true + [/codeblock] + Return [code]true[/code] to make all options always visible. </description> </method> <method name="get_preset_count" qualifiers="virtual"> @@ -150,6 +160,8 @@ <argument index="4" name="gen_files" type="Array"> </argument> <description> + Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function. + This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. </description> </method> </methods> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 2f62fe9e40..5fbe427f67 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -14,41 +14,50 @@ <return type="void"> </return> <description> + Refreshes the inspector. + [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.) </description> </method> </methods> <members> - <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" /> + <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false"> + If [code]true[/code], horizontal scrolling is enabled. An horizontal scroll bar will display at the bottom of the inspector. + </member> </members> <signals> <signal name="object_id_selected"> <argument index="0" name="id" type="int"> </argument> <description> + Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector. </description> </signal> <signal name="property_deleted"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is removed from the inspector. </description> </signal> <signal name="property_edited"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is edited in the inspector. </description> </signal> <signal name="property_keyed"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. </description> </signal> <signal name="property_selected"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is selected in the inspector. </description> </signal> <signal name="property_toggled"> @@ -57,6 +66,8 @@ <argument index="1" name="checked" type="bool"> </argument> <description> + Emitted when a boolean property is toggled in the inspector. + [b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. </description> </signal> <signal name="resource_selected"> @@ -65,10 +76,12 @@ <argument index="1" name="prop" type="String"> </argument> <description> + Emitted when a resource is selected in the inspector. </description> </signal> <signal name="restart_requested"> <description> + Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. </description> </signal> </signals> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 1d877e632e..8b2b9c9350 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -23,13 +23,14 @@ <return type="Control"> </return> <description> - Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. + Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. </description> </method> <method name="get_current_path" qualifiers="const"> <return type="String"> </return> <description> + Returns the current path being viewed in the [FileSystemDock]. </description> </method> <method name="get_edited_scene_root"> @@ -43,26 +44,29 @@ <return type="EditorSettings"> </return> <description> - Returns the [EditorSettings]. + Returns the editor's [EditorSettings] instance. </description> </method> <method name="get_editor_viewport"> <return type="Control"> </return> <description> - Returns the editor [Viewport]. + Returns the editor's [Viewport] instance. + [b]Note:[/b] This returns the main editor viewport containing the whole editor, not the 2D or 3D viewports specifically. </description> </method> <method name="get_file_system_dock"> <return type="FileSystemDock"> </return> <description> + Returns the editor's [FileSystemDock] instance. </description> </method> <method name="get_inspector" qualifiers="const"> <return type="EditorInspector"> </return> <description> + Returns the editor's [EditorInspector] instance. </description> </method> <method name="get_open_scenes" qualifiers="const"> @@ -83,34 +87,35 @@ <return type="EditorFileSystem"> </return> <description> - Returns the [EditorFileSystem]. + Returns the editor's [EditorFileSystem] instance. </description> </method> <method name="get_resource_previewer"> <return type="EditorResourcePreview"> </return> <description> - Returns the [EditorResourcePreview]. + Returns the editor's [EditorResourcePreview] instance. </description> </method> <method name="get_script_editor"> <return type="ScriptEditor"> </return> <description> - Returns the [ScriptEditor]. + Returns the editor's [ScriptEditor] instance. </description> </method> <method name="get_selected_path" qualifiers="const"> <return type="String"> </return> <description> + Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. </description> </method> <method name="get_selection"> <return type="EditorSelection"> </return> <description> - Returns the [EditorSelection]. + Returns the editor's [EditorSelection] instance. </description> </method> <method name="inspect_object"> @@ -121,14 +126,14 @@ <argument index="1" name="for_property" type="String" default=""""> </argument> <description> - Shows the given property on the given [code]object[/code] in the Editor's Inspector dock. + Shows the given property on the given [code]object[/code] in the editor's Inspector dock. </description> </method> <method name="is_playing_scene" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code], if a scene is currently being played; [code]false[/code] otherwise. Paused scenes are considered as being played. + Returns [code]true[/code] if a scene is currently being played, [code]false[/code] otherwise. Paused scenes are considered as being played. </description> </method> <method name="is_plugin_enabled" qualifiers="const"> @@ -137,7 +142,7 @@ <argument index="0" name="plugin" type="String"> </argument> <description> - Returns the enabled status of a plugin. The plugin name is the same as its directory name. + Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name. </description> </method> <method name="make_mesh_previews"> @@ -225,6 +230,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). </description> </method> <method name="set_plugin_enabled"> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 6d695ddeea..45541b9263 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -15,6 +15,7 @@ <argument index="0" name="segments" type="PackedVector3Array"> </argument> <description> + Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method redraw]. </description> </method> <method name="add_collision_triangles"> @@ -69,6 +70,7 @@ <argument index="3" name="material" type="Material" default="null"> </argument> <description> + Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method redraw]. </description> </method> <method name="add_unscaled_billboard"> @@ -88,6 +90,7 @@ <return type="void"> </return> <description> + Removes everything in the gizmo including meshes, collisions and handles. </description> </method> <method name="commit_handle" qualifiers="virtual"> @@ -143,14 +146,14 @@ <argument index="0" name="index" type="int"> </argument> <description> - Gets whether a handle is highlighted or not. + Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse. </description> </method> <method name="redraw" qualifiers="virtual"> <return type="void"> </return> <description> - This function is called when the Node3D this gizmo refers to changes (the [method Node3D.update_gizmo] is called). + This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called). </description> </method> <method name="set_handle" qualifiers="virtual"> @@ -173,6 +176,7 @@ <argument index="0" name="hidden" type="bool"> </argument> <description> + Sets the gizmo's hidden state. If [code]true[/code], the gizmo will be hidden. If [code]false[/code], it will be shown. </description> </method> <method name="set_spatial_node"> @@ -181,6 +185,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> + Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D]. </description> </method> </methods> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index ca75b47fbf..b81281b5b6 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -139,6 +139,8 @@ <return type="String"> </return> <description> + Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. + All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos. </description> </method> <method name="has_gizmo" qualifiers="virtual"> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 4da3b58b94..f568263ff8 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -73,24 +73,25 @@ </methods> <members> <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false"> - Used by the inspector, set when property is checkable. + Used by the inspector, set to [code]true[/code] when the property is checkable. </member> <member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false"> - Used by the inspector, when the property is checked. + Used by the inspector, set to [code]true[/code] when the property is checked. </member> <member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false"> + Used by the inspector, set to [code]true[/code] when the property can be deleted by the user. </member> <member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false"> - Used by the inspector, when the property must draw with error color. + Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties. </member> <member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false"> - Used by the inspector, when the property can add keys for animation. + Used by the inspector, set to [code]true[/code] when the property can add keys for animation. </member> <member name="label" type="String" setter="set_label" getter="get_label" default=""""> - Sets this property to change the label (if you want to show one). + Set this property to change the label (if you want to show one). </member> <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> - Used by the inspector, when the property is read-only. + Used by the inspector, set to [code]true[/code] when the property is read-only. </member> </members> <signals> @@ -134,6 +135,7 @@ <argument index="0" name="property" type="StringName"> </argument> <description> + Emitted when a property was deleted. Used internally. </description> </signal> <signal name="property_keyed"> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 19921ff5c8..0c6a2d61cd 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -5,11 +5,16 @@ </brief_description> <description> Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor > Editor Settings[/b] menu. - Accessing the settings is done by using the regular [Object] API, such as: + Property names use slash delimiters to distinguish sections. Setting values can be of any [Variant] type. It's recommended to use [code]snake_case[/code] for editor settings to be consistent with the Godot editor itself. + Accessing the settings can be done using the following methods, such as: [codeblock] - settings.set(prop,value) - settings.get(prop) - list_of_settings = settings.get_property_list() + # `settings.set("some/property", value)` also works as this class overrides `_set()` internally. + settings.set_setting("some/property",value) + + # `settings.get("some/property", value)` also works as this class overrides `_get()` internally. + settings.get_setting("some/property") + + var list_of_settings = settings.get_property_list() [/codeblock] [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_settings]. </description> @@ -47,14 +52,14 @@ <argument index="0" name="property" type="String"> </argument> <description> - Erase a given setting (pass full property path). + Erases the setting whose name is specified by [code]property[/code]. </description> </method> <method name="get_favorites" qualifiers="const"> <return type="PackedStringArray"> </return> <description> - Gets the list of favorite files and directories for this project. + Returns the list of favorite files and directories for this project. </description> </method> <method name="get_project_metadata" qualifiers="const"> @@ -67,20 +72,21 @@ <argument index="2" name="default" type="Variant" default="null"> </argument> <description> + Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata]. </description> </method> <method name="get_project_settings_dir" qualifiers="const"> <return type="String"> </return> <description> - Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. + Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved. </description> </method> <method name="get_recent_dirs" qualifiers="const"> <return type="PackedStringArray"> </return> <description> - Gets the list of recently visited folders in the file dialog for this project. + Returns the list of recently visited folders in the file dialog for this project. </description> </method> <method name="get_setting" qualifiers="const"> @@ -89,6 +95,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> <method name="get_settings_dir" qualifiers="const"> @@ -106,6 +113,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise. </description> </method> <method name="property_can_revert"> @@ -114,6 +122,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings. </description> </method> <method name="property_get_revert"> @@ -122,6 +131,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings. </description> </method> <method name="set_favorites"> @@ -143,6 +153,7 @@ <argument index="2" name="update_current" type="bool"> </argument> <description> + Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well. </description> </method> <method name="set_project_metadata"> @@ -155,6 +166,7 @@ <argument index="2" name="data" type="Variant"> </argument> <description> + Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. </description> </method> <method name="set_recent_dirs"> @@ -174,19 +186,20 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance. </description> </method> </methods> <signals> <signal name="settings_changed"> <description> - Emitted when editor settings change. + Emitted after any editor setting has changed. </description> </signal> </signals> <constants> <constant name="NOTIFICATION_EDITOR_SETTINGS_CHANGED" value="10000"> - Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes. + Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. </constant> </constants> </class> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 76153ae041..7e8f0807ac 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -8,6 +8,7 @@ [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). + [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 0b0d71fccf..61e0d2e2b9 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -64,6 +64,7 @@ add_child(texture_rect) texture_rect.texture = texture [/codeblock] + [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 105def21ca..238bc970ef 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -112,7 +112,18 @@ <return type="PackedStringArray"> </return> <description> - Returns the command line arguments passed to the engine. + Returns the command-line arguments passed to the engine. + Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. + You can also incorporate environment variables using the [method get_environment] method. + You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project. + Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments: + [codeblock] + var arguments = {} + for argument in OS.get_cmdline_args(): + if argument.find("=") > -1: + var key_value = argument.split("=") + arguments[key_value[0].lstrip("--")] = key_value[1] + [/codeblock] </description> </method> <method name="get_connected_midi_inputs"> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index efd55f5566..370e6bd19c 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -100,6 +100,13 @@ [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> + <method name="get_inverse_inertia_tensor"> + <return type="Basis"> + </return> + <description> + Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. + </description> + </method> <method name="set_axis_lock"> <return type="void"> </return> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 32895310d1..c97f99cfaa 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -154,7 +154,10 @@ <argument index="0" name="with" type="Vector2"> </argument> <description> - Returns the dot product with vector [code]b[/code]. + Returns the dot product with vector [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. + The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. + When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned. + [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> <method name="floor"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 0c861e5ee2..7ba8cb5eed 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -123,7 +123,10 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the dot product with [code]b[/code]. + Returns the dot product with vector [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. + The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. + When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned. + [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> <method name="floor"> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index a5abf16a8d..02fe7a7cd0 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself. - [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you just want to receive notifications, use [VisibilityNotifier2D] instead. + [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization. </description> <tutorials> diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml index 342a37e7a4..d78ebb55f2 100644 --- a/doc/classes/VisibilityEnabler3D.xml +++ b/doc/classes/VisibilityEnabler3D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself. - [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node. + If you just want to receive notifications, use [VisibilityNotifier3D] instead. + [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. [b]Note:[/b] VisibilityEnabler3D will not affect nodes added after scene initialization. </description> <tutorials> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 391163ef94..314a100989 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. - [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead. + [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml index eb7bb91f26..e5d3116612 100644 --- a/doc/classes/VisibilityNotifier3D.xml +++ b/doc/classes/VisibilityNotifier3D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view. - [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler3D] instead. + [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. </description> <tutorials> </tutorials> |