mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
7adf4cc9b5
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
104 lines
4.4 KiB
XML
104 lines
4.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="EngineDebugger" inherits="Object" version="4.0">
|
|
<brief_description>
|
|
Exposes the internal debugger.
|
|
</brief_description>
|
|
<description>
|
|
[EngineDebugger] handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="has_capture">
|
|
<return type="bool" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
Returns [code]true[/code] if a capture with the given name is present otherwise [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="has_profiler">
|
|
<return type="bool" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
Returns [code]true[/code] if a profiler with the given name is present otherwise [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="is_active">
|
|
<return type="bool" />
|
|
<description>
|
|
Returns [code]true[/code] if the debugger is active otherwise [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="is_profiling">
|
|
<return type="bool" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
Returns [code]true[/code] if a profiler with the given name is present and active otherwise [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="profiler_add_frame_data">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="data" type="Array" />
|
|
<description>
|
|
Calls the [code]add[/code] callable of the profiler with given [code]name[/code] and [code]data[/code].
|
|
</description>
|
|
</method>
|
|
<method name="profiler_enable">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="enable" type="bool" />
|
|
<argument index="2" name="arguments" type="Array" default="[]" />
|
|
<description>
|
|
Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument.
|
|
</description>
|
|
</method>
|
|
<method name="register_message_capture">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="callable" type="Callable" />
|
|
<description>
|
|
Registers a message capture with given [code]name[/code]. If [code]name[/code] 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].
|
|
</description>
|
|
</method>
|
|
<method name="register_profiler">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="toggle" type="Callable" />
|
|
<argument index="2" name="add" type="Callable" />
|
|
<argument index="3" name="tick" type="Callable" />
|
|
<description>
|
|
Registers a profiler with the given [code]name[/code].
|
|
[code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument.
|
|
[code]add[/code] callable is called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. It must take a data array as argument.
|
|
[code]tick[/code] callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments.
|
|
</description>
|
|
</method>
|
|
<method name="send_message">
|
|
<return type="void" />
|
|
<argument index="0" name="message" type="String" />
|
|
<argument index="1" name="data" type="Array" />
|
|
<description>
|
|
Sends a message with given [code]message[/code] and [code]data[/code] array.
|
|
</description>
|
|
</method>
|
|
<method name="unregister_message_capture">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
Unregisters the message capture with given [code]name[/code].
|
|
</description>
|
|
</method>
|
|
<method name="unregister_profiler">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
Unregisters a profiler with given [code]name[/code].
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<constants>
|
|
</constants>
|
|
</class>
|