diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/DisplayServer.xml | 5 | ||||
-rw-r--r-- | doc/classes/EditorDebuggerPlugin.xml | 116 | ||||
-rw-r--r-- | doc/classes/EditorDebuggerSession.xml | 86 | ||||
-rw-r--r-- | doc/classes/EditorPlugin.xml | 4 | ||||
-rw-r--r-- | doc/classes/PrimitiveMesh.xml | 6 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 3 | ||||
-rw-r--r-- | doc/classes/Translation.xml | 6 | ||||
-rw-r--r-- | doc/classes/Tree.xml | 8 |
8 files changed, 172 insertions, 62 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 76c67fd704..0039301bf6 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1638,8 +1638,9 @@ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode"> - Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. - Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + Exclusive full screen window mode. This mode is implemented on Windows and macOS only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. + [b]On Windows:[/b] Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + [b]On macOS:[/b] Exclusive full-screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags"> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index c3e0a995c6..10da1edd56 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -1,88 +1,88 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorDebuggerPlugin" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="EditorDebuggerPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A base class to implement debugger plugins. </brief_description> <description> [EditorDebuggerPlugin] provides functions related to the editor side of the debugger. - You don't need to instantiate this class; that is automatically handled by the debugger. [Control] nodes can be added as child nodes to provide a GUI for the plugin. - Do not free or reparent this node, otherwise it becomes unusable. - To use [EditorDebuggerPlugin], register it using the [method EditorPlugin.add_debugger_plugin] method first. + To interact with the debugger, an instance of this class must be added to the editor via [method EditorPlugin.add_debugger_plugin]. + Once added, the [method _setup_session] callback will be called for every [EditorDebuggerSession] available to the plugin, and when new ones are created (the sessions may be inactive during this stage). + You can retrieve the available [EditorDebuggerSession]s via [method get_sessions] or get a specific one via [method get_session]. + [codeblocks] + [gdscript] + @tool + extends EditorPlugin + + class ExampleEditorDebugger extends EditorDebuggerPlugin: + + func _has_capture(prefix): + # Return true if you wish to handle message with this prefix. + return prefix == "my_plugin" + + func _capture(message, data, session_id): + if message == "my_plugin:ping": + get_session(session_id).send_message("my_plugin:echo", data) + + func _setup_session(session_id): + # Add a new tab in the debugger session UI containing a label. + var label = Label.new() + label.name = "Example plugin" + label.text = "Example plugin" + var session = get_session(session_id) + # Listens to the session started and stopped signals. + session.started.connect(func (): print("Session started")) + session.stopped.connect(func (): print("Session stopped")) + session.add_session_tab(label) + + var debugger = ExampleEditorDebugger.new() + + func _enter_tree(): + add_debugger_plugin(debugger) + + func _exit_tree(): + remove_debugger_plugin(debugger) + [/gdscript] + [/codeblocks] </description> <tutorials> </tutorials> <methods> - <method name="has_capture"> - <return type="bool" /> - <param index="0" name="name" type="StringName" /> - <description> - Returns [code]true[/code] if a message capture with given name is present otherwise [code]false[/code]. - </description> - </method> - <method name="is_breaked"> - <return type="bool" /> - <description> - Returns [code]true[/code] if the game is in break state otherwise [code]false[/code]. - </description> - </method> - <method name="is_debuggable"> + <method name="_capture" qualifiers="virtual"> <return type="bool" /> + <param index="0" name="message" type="String" /> + <param index="1" name="data" type="Array" /> + <param index="2" name="session_id" type="int" /> <description> - Returns [code]true[/code] if the game can be debugged otherwise [code]false[/code]. + Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the message (which you can retrieve via [method get_session]). </description> </method> - <method name="is_session_active"> + <method name="_has_capture" qualifiers="virtual const"> <return type="bool" /> + <param index="0" name="capture" type="String" /> <description> - Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. + Override this method to enable receiving messages from the debugger. If [param capture] is "my_message" then messages starting with "my_message:" will be passes to the [method _capture] method. </description> </method> - <method name="register_message_capture"> + <method name="_setup_session" qualifiers="virtual"> <return type="void" /> - <param index="0" name="name" type="StringName" /> - <param index="1" name="callable" type="Callable" /> + <param index="0" name="session_id" type="int" /> <description> - Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. - Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. + Override this method to be notified whenever a new [EditorDebuggerSession] is created (the session may be inactive during this stage). </description> </method> - <method name="send_message"> - <return type="void" /> - <param index="0" name="message" type="String" /> - <param index="1" name="data" type="Array" /> + <method name="get_session"> + <return type="EditorDebuggerSession" /> + <param index="0" name="id" type="int" /> <description> - Sends a message with given [param message] and [param data] array. + Returns the [EditorDebuggerSession] with the given [param id]. </description> </method> - <method name="unregister_message_capture"> - <return type="void" /> - <param index="0" name="name" type="StringName" /> + <method name="get_sessions"> + <return type="Array" /> <description> - Unregisters the message capture with given name. + Returns an array of [EditorDebuggerSession] currently available to this debugger plugin. + Note: Not sessions in the array may be inactive, check their state via [method EditorDebuggerSession.is_active] </description> </method> </methods> - <signals> - <signal name="breaked"> - <param index="0" name="can_debug" type="bool" /> - <description> - Emitted when the game enters a break state. - </description> - </signal> - <signal name="continued"> - <description> - Emitted when the game exists a break state. - </description> - </signal> - <signal name="started"> - <description> - Emitted when the debugging starts. - </description> - </signal> - <signal name="stopped"> - <description> - Emitted when the debugging stops. - </description> - </signal> - </signals> </class> diff --git a/doc/classes/EditorDebuggerSession.xml b/doc/classes/EditorDebuggerSession.xml new file mode 100644 index 0000000000..faf528c143 --- /dev/null +++ b/doc/classes/EditorDebuggerSession.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorDebuggerSession" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A class to interact with the editor debugger. + </brief_description> + <description> + This class cannot be directly instantiated and must be retrieved via a [EditorDebuggerPlugin]. + You can add tabs to the session UI via [method add_session_tab], send messages via [method send_message], and toggle [EngineProfiler]s via [method toggle_profiler]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_session_tab"> + <return type="void" /> + <param index="0" name="control" type="Control" /> + <description> + Adds the given [param control] to the debug session UI in the debugger bottom panel. + </description> + </method> + <method name="is_active"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the debug session is currently attached to a remote instance. + </description> + </method> + <method name="is_breaked"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the attached remote instance is currently in the debug loop. + </description> + </method> + <method name="is_debuggable"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the attached remote instance can be debugged. + </description> + </method> + <method name="remove_session_tab"> + <return type="void" /> + <param index="0" name="control" type="Control" /> + <description> + Removes the given [param control] from the debug session UI in the debugger bottom panel. + </description> + </method> + <method name="send_message"> + <return type="void" /> + <param index="0" name="message" type="String" /> + <param index="1" name="data" type="Array" default="[]" /> + <description> + Sends the given [param message] to the attached remote instance, optionally passing additionally [param data]. See [EngineDebugger] for how to retrieve those messages. + </description> + </method> + <method name="toggle_profiler"> + <return type="void" /> + <param index="0" name="profiler" type="String" /> + <param index="1" name="enable" type="bool" /> + <param index="2" name="data" type="Array" default="[]" /> + <description> + Toggle the given [param profiler] on the attached remote instance, optionally passing additionally [param data]. See [EngineProfiler] for more details. + </description> + </method> + </methods> + <signals> + <signal name="breaked"> + <param index="0" name="can_debug" type="bool" /> + <description> + Emitted when the attached remote instance enters a break state. If [param can_debug] is [code]true[/code], the remote instance will enter the debug loop. + </description> + </signal> + <signal name="continued"> + <description> + Emitted when the attached remote instance exits a break state. + </description> + </signal> + <signal name="started"> + <description> + Emitted when a remote instance is attached to this session (i.e. the session becomes active). + </description> + </signal> + <signal name="stopped"> + <description> + Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). + </description> + </signal> + </signals> +</class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 2289a373bf..806588d100 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -415,7 +415,7 @@ </method> <method name="add_debugger_plugin"> <return type="void" /> - <param index="0" name="script" type="Script" /> + <param index="0" name="script" type="EditorDebuggerPlugin" /> <description> Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. </description> @@ -599,7 +599,7 @@ </method> <method name="remove_debugger_plugin"> <return type="void" /> - <param index="0" name="script" type="Script" /> + <param index="0" name="script" type="EditorDebuggerPlugin" /> <description> Removes the debugger plugin with given script from the Debugger. </description> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 7a411b27ac..b1c8907d8e 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -34,6 +34,9 @@ </method> </methods> <members> + <member name="add_uv2" type="bool" setter="set_add_uv2" getter="get_add_uv2" default="false"> + If set, generates UV2 UV coordinates applying a padding using the [member uv2_padding] setting. UV2 is needed for lightmapping. + </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> @@ -44,5 +47,8 @@ <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. </member> + <member name="uv2_padding" type="float" setter="set_uv2_padding" getter="get_uv2_padding" default="2.0"> + If [member add_uv2] is set, specifies the padding in pixels applied along seams of the mesh. If at generation the size of the lightmap texture can't be determined, the UVs are calculated assuming a texture size of 1024x1024. + </member> </members> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 4699131c41..015de62ec1 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -2016,6 +2016,9 @@ <member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024"> The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA]. </member> + <member name="rendering/lightmapping/primitive_meshes/texel_size" type="float" setter="" getter="" default="0.2"> + The texel_size that is used to calculate the [member Mesh.lightmap_size_hint] on [PrimitiveMesh] resources if [member PrimitiveMesh.add_uv2] is enabled. + </member> <member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15"> The framerate-independent update speed when representing dynamic object lighting from [LightmapProbe]s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. </member> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index 314be9adf8..ae2f8d8dff 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -88,6 +88,12 @@ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. </description> </method> + <method name="get_translated_message_list" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + Returns all the messages (translated text). + </description> + </method> </methods> <members> <member name="locale" type="String" setter="set_locale" getter="get_locale" default=""en""> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 532f6703b2..bf79821e2d 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -293,6 +293,14 @@ Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> + <method name="set_selected"> + <return type="void" /> + <param index="0" name="item" type="TreeItem" /> + <param index="1" name="column" type="int" /> + <description> + Selects the specified [TreeItem] and column. + </description> + </method> </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false"> |