doc: Proofread and complete various nodes

All 100% completed: MainLoop, Node, Object, Path, Performance,
Reference, Resource, SceneState, SceneTree, UndoRedo.

Also fixed some en_GB occurrences as the reference spelling is en_US.
This commit is contained in:
Rémi Verschelde 2019-06-26 15:57:13 +02:00
parent 43a6969470
commit 867dda1124
24 changed files with 301 additions and 152 deletions

View file

@ -1689,7 +1689,7 @@ void Object::clear_internal_resource_paths() {
void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_class"), &Object::get_class);
ClassDB::bind_method(D_METHOD("is_class", "type"), &Object::is_class);
ClassDB::bind_method(D_METHOD("is_class", "class"), &Object::is_class);
ClassDB::bind_method(D_METHOD("set", "property", "value"), &Object::_set_bind);
ClassDB::bind_method(D_METHOD("get", "property"), &Object::_get_bind);
ClassDB::bind_method(D_METHOD("set_indexed", "property", "value"), &Object::_set_indexed_bind);
@ -1709,14 +1709,8 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_meta", "name"), &Object::has_meta);
ClassDB::bind_method(D_METHOD("get_meta_list"), &Object::_get_meta_list_bind);
//todo reimplement this per language so all 5 arguments can be called
//ClassDB::bind_method(D_METHOD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
//ClassDB::bind_method(D_METHOD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("add_user_signal", "signal", "arguments"), &Object::_add_user_signal, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("has_user_signal", "signal"), &Object::_has_user_signal);
//ClassDB::bind_method(D_METHOD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array()));
{
MethodInfo mi;

View file

@ -44,9 +44,9 @@ void MainLoop::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
BIND_VMETHOD(MethodInfo("_iteration", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_idle", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
BIND_VMETHOD(MethodInfo("_finalize"));
BIND_CONSTANT(NOTIFICATION_WM_MOUSE_ENTER);

View file

@ -5,7 +5,7 @@
</brief_description>
<description>
The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them.
This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised.
This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognized.
Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view.
</description>
<tutorials>

View file

@ -27,7 +27,7 @@
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected allong the swing axis.
Could be defined as looseness in the [ConeTwistJoint].
If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code].
If below 0.05, this behavior is locked. Default value: [code]PI/4[/code].
</member>
<member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span">
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
@ -39,7 +39,7 @@
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected allong the swing axis.
Could be defined as looseness in the [ConeTwistJoint].
If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code].
If below 0.05, this behavior is locked. Default value: [code]PI/4[/code].
</constant>
<constant name="PARAM_TWIST_SPAN" value="1" enum="Param">
Twist is the rotation around the twist axis, this value defined how far the joint can twist.

View file

@ -126,7 +126,7 @@
<argument index="1" name="skip_hidden" type="bool" default="false">
</argument>
<description>
Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
Initialize the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out.
If you pass [code]skip_hidden[/code], then hidden files would be filtered out.
</description>

View file

@ -78,7 +78,7 @@
</members>
<constants>
<constant name="MODE_ADD" value="0" enum="Mode">
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light.
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.
</constant>
<constant name="MODE_SUB" value="1" enum="Mode">
Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.

View file

@ -1,10 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MainLoop" inherits="Object" category="Core" version="3.2">
<brief_description>
Main loop is the abstract main loop base class.
Abstract base class for the game's main loop.
</brief_description>
<description>
Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
[MainLoop] is the abstract base class for a Godot project's game loop. It in inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
Upon application start, a [MainLoop] implementation has to be provided to the OS, or the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
Here is an example script implementing a simple [MainLoop]:
[codeblock]
extends MainLoop
var time_elapsed = 0
var keys_typed = []
var quit = false
func _initialize():
print("Initialized:")
print(" Starting time: %s" % str(time_elapsed))
func _idle(delta):
time_elapsed += delta
# Return true to end the main loop
return quit
func _input_event(event):
# Record keys
if event is InputEventKey and event.pressed and !event.echo:
keys_typed.append(OS.get_scancode_string(event.scancode))
# Quit on Escape press
if event.scancode == KEY_ESCAPE:
quit = true
# Quit on any mouse click
if event is InputEventMouseButton:
quit = true
func _finalize():
print("Finalized:")
print(" End time: %s" % str(time_elapsed))
print(" Keys typed: %s" % var2str(keys_typed))
[/codeblock]
</description>
<tutorials>
</tutorials>
@ -14,9 +48,10 @@
</return>
<argument index="0" name="files" type="PoolStringArray">
</argument>
<argument index="1" name="screen" type="int">
<argument index="1" name="from_screen" type="int">
</argument>
<description>
Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</method>
<method name="_finalize" qualifiers="virtual">
@ -27,12 +62,13 @@
</description>
</method>
<method name="_idle" qualifiers="virtual">
<return type="void">
<return type="bool">
</return>
<argument index="0" name="delta" type="float">
</argument>
<description>
Called each idle frame with time since last call as an only argument.
Called each idle frame with the time since the last idle frame as argument (in seconds). Equivalent to [method Node._process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
<method name="_initialize" qualifiers="virtual">
@ -48,6 +84,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
Called whenever an [InputEvent] is received by the main loop.
</description>
</method>
<method name="_input_text" qualifiers="virtual">
@ -56,20 +93,24 @@
<argument index="0" name="text" type="String">
</argument>
<description>
Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0.
</description>
</method>
<method name="_iteration" qualifiers="virtual">
<return type="void">
<return type="bool">
</return>
<argument index="0" name="delta" type="float">
</argument>
<description>
Called each physics frame with the time since the last physics frame as argument (in seconds). Equivalent to [method Node._physics_process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
<method name="finish">
<return type="void">
</return>
<description>
Should not be called manually, override [method _finalize] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="idle">
@ -78,12 +119,14 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
Should not be called manually, override [method _idle] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="init">
<return type="void">
</return>
<description>
Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="input_event">
@ -92,6 +135,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="input_text">
@ -100,6 +144,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="iteration">
@ -108,33 +153,57 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
Should not be called manually, override [method _iteration] instead. Will be removed in Godot 4.0.
</description>
</method>
</methods>
<constants>
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
Notification received from the OS when the mouse enters the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003">
Notification received from the OS when the mouse leaves the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_IN" value="1004">
Notification received from the OS when the game window is focused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005">
Notification received from the OS when the game window is unfocused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
Implemented on desktop platforms.
</constant>
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
No supported platforms currently send this notification.
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_CRASH" value="1012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
</constants>
</class>

View file

@ -6,8 +6,8 @@
<description>
Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names.
A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
[b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
[b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the [constant NOTIFICATION_ENTER_TREE] notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
Once all nodes have been added in the scene tree, they receive the [constant NOTIFICATION_READY] notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
[b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
@ -25,7 +25,7 @@
</return>
<description>
Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing, or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification].
Corresponds to the [constant NOTIFICATION_ENTER_TREE] notification in [method Object._notification].
</description>
</method>
<method name="_exit_tree" qualifiers="virtual">
@ -33,7 +33,7 @@
</return>
<description>
Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]
Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]
</description>
</method>
<method name="_get_configuration_warning" qualifiers="virtual">
@ -64,7 +64,7 @@
<description>
Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant.
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Corresponds to the NOTIFICATION_PHYSICS_PROCESS notification in [method Object._notification].
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
</description>
</method>
<method name="_process" qualifiers="virtual">
@ -75,7 +75,7 @@
<description>
Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant.
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification].
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
</description>
</method>
<method name="_ready" qualifiers="virtual">
@ -83,7 +83,7 @@
</return>
<description>
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
Corresponds to the NOTIFICATION_READY notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. Also see [method _enter_tree].
</description>
</method>
@ -120,7 +120,7 @@
</argument>
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
Setting "legible_unique_name" [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
Setting [code]legible_unique_name[/code] to [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
</description>
</method>
<method name="add_child_below_node">
@ -134,7 +134,7 @@
</argument>
<description>
Adds a child node. The child is placed below the given node in the list of children.
Setting "legible_unique_name" [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
Setting [code]legible_unique_name[/code] to [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
</description>
</method>
<method name="add_to_group">
@ -146,7 +146,7 @@
</argument>
<description>
Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree].
[code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
</description>
</method>
<method name="can_process" qualifiers="const">
@ -314,7 +314,7 @@
<return type="float">
</return>
<description>
Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed in [OS].
Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.target_fps].
</description>
</method>
<method name="get_position_in_parent" qualifiers="const">
@ -475,7 +475,7 @@
<argument index="1" name="to_position" type="int">
</argument>
<description>
Moves a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
</description>
</method>
<method name="print_stray_nodes">
@ -525,7 +525,7 @@
<argument index="2" name="parent_first" type="bool" default="false">
</argument>
<description>
Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the parent_first argument is [code]true[/code] then the method will be called on the current node first, then on all children. If it is [code]false[/code] then the children will be called first.
Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code] then the method will be called on the current node first, then on all children. If it is [code]false[/code] then the children will be called first.
</description>
</method>
<method name="propagate_notification">
@ -534,7 +534,7 @@
<argument index="0" name="what" type="int">
</argument>
<description>
Notifies the current node and all its children recursively by calling notification() on all of them.
Notifies the current node and all its children recursively by calling [method Object.notification] on all of them.
</description>
</method>
<method name="queue_free">
@ -730,7 +730,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, see [OS] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored.
Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.target_fps] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_physics_process_internal">
@ -739,7 +739,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes behaviour.
Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes behavior.
</description>
</method>
<method name="set_process">
@ -748,7 +748,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
Enables or disables processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overridden. Any calls to this before [method _ready] will be ignored.
Enables or disables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_input">
@ -766,7 +766,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes behaviour.
Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes behavior.
</description>
</method>
<method name="set_process_priority">
@ -775,6 +775,7 @@
<argument index="0" name="priority" type="int">
</argument>
<description>
Sets the node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first.
</description>
</method>
<method name="set_process_unhandled_input">
@ -878,7 +879,7 @@
Notification received every frame when the process flag is set (see [method set_process]).
</constant>
<constant name="NOTIFICATION_PARENTED" value="18">
Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree.
Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the [SceneTree].
</constant>
<constant name="NOTIFICATION_UNPARENTED" value="19">
Notification received when a node is unparented (parent removed it from the list of children).
@ -902,32 +903,54 @@
Notification received every frame when the internal physics process flag is set (see [method set_physics_process_internal]).
</constant>
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
Notification received from the OS when the mouse enters the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003">
Notification received from the OS when the mouse leaves the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_IN" value="1004">
Notification received from the OS when the game window is focused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005">
Notification received from the OS when the game window is unfocused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
Implemented on desktop platforms.
</constant>
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
No supported platforms currently send this notification.
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_CRASH" value="1012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
<constant name="PAUSE_MODE_INHERIT" value="0" enum="PauseMode">
Inherits pause mode from the node's parent. For the root node, it is equivalent to PAUSE_MODE_STOP. Default.
Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default.
</constant>
<constant name="PAUSE_MODE_STOP" value="1" enum="PauseMode">
Stop processing when the [SceneTree] is paused.

View file

@ -47,6 +47,7 @@
# This will be parsed as a node path to the 'x' component of the 'position' property in the current node
var property_path = node_path.get_as_property_path()
print(property_path) # :position:x
[/codeblock]
</description>
</method>
<method name="get_concatenated_subnames">
@ -80,7 +81,7 @@
</return>
<description>
Get the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included.
For example, [code]"Path2D/PathFollow2D/Sprite"[code] has 3 names.
For example, [code]"Path2D/PathFollow2D/Sprite"[/code] has 3 names.
</description>
</method>
<method name="get_subname">

View file

@ -102,7 +102,7 @@
<description>
Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable.
The arguments are used in the given order and separated by a space, so [code]OS.execute('ping', ['-w', '3', 'godotengine.org'], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell.
This method has slightly different behaviour based on whether the [code]blocking[/code] mode is enabled.
This method has slightly different behavior based on whether the [code]blocking[/code] mode is enabled.
When [code]blocking[/code] is enabled, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution.
When [code]blocking[/code] is disabled, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty.
The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return -1.
@ -222,7 +222,7 @@
</return>
<description>
Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string.
[code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME cursor position.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.
</description>
</method>
<method name="get_ime_text" qualifiers="const">
@ -230,7 +230,7 @@
</return>
<description>
Returns IME intermediate composition string.
[code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME composition string.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.
</description>
</method>
<method name="get_latin_keyboard_variant" qualifiers="const">
@ -280,7 +280,7 @@
<return type="int" enum="OS.PowerState">
</return>
<description>
Returns the current state of the device regarding battery and power. See [code]POWERSTATE_*[/code] constants.
Returns the current state of the device regarding battery and power. See [enum PowerState] constants.
</description>
</method>
<method name="get_process_id" qualifiers="const">

View file

@ -9,7 +9,7 @@
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
Objects also receive notifications. Notifications are a simple way to notify the object about simple events, so they can all be handled together. See [method _notification].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
</description>
<tutorials>
</tutorials>
@ -20,6 +20,7 @@
<argument index="0" name="property" type="String">
</argument>
<description>
Virtual method which can be overridden to customize the return value of [method get].
Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist.
</description>
</method>
@ -27,14 +28,16 @@
<return type="Array">
</return>
<description>
Returns the object's property list as an [Array] of dictionaries. Dictionaries must contain: name:String, type:int (see TYPE_* enum in [@GlobalScope]) and optionally: hint:int (see PROPERTY_HINT_* in [@GlobalScope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@GlobalScope]).
Virtual method which can be overridden to customize the return value of [method get_property_list].
Returns the object's property list as an [Array] of dictionaries.
Each property's [Dictionary] must contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum @GlobalScope.Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum @GlobalScope.PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum @GlobalScope.PropertyUsageFlags]).
</description>
</method>
<method name="_init" qualifiers="virtual">
<return type="void">
</return>
<description>
The virtual method called upon initialization.
Called when the object is initialized.
</description>
</method>
<method name="_notification" qualifiers="virtual">
@ -43,7 +46,7 @@
<argument index="0" name="what" type="int">
</argument>
<description>
Notify the object internally using an ID.
Called whenever the object receives a notification, which is identified in [code]what[/code] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method.
</description>
</method>
<method name="_set" qualifiers="virtual">
@ -54,6 +57,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Virtual method which can be overridden to customize the return value of [method set].
Sets a property. Returns [code]true[/code] if the [code]property[/code] exists.
</description>
</method>
@ -61,8 +65,8 @@
<return type="String">
</return>
<description>
Virtual method which can be overridden to customize the return value of [method to_string], and thus the object's representation where it is converted to a string, e.g. with [code]print(obj)[/code].
Returns a [String] representing the object. Default is [code]"[ClassName:RID]"[/code].
Override this method to customize the [String] representation of the object when it's being converted to a string, for example: [code]print(obj)[/code].
</description>
</method>
<method name="add_user_signal">
@ -73,7 +77,7 @@
<argument index="1" name="arguments" type="Array" default="[ ]">
</argument>
<description>
Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing "name" and "type" (from [@GlobalScope] TYPE_*).
Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum @GlobalScope.Variant.Type]) entries.
</description>
</method>
<method name="call" qualifiers="vararg">
@ -82,7 +86,10 @@
<argument index="0" name="method" type="String">
</argument>
<description>
Calls the [code]method[/code] on the object and returns a result. Pass parameters as a comma separated list.
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
call("set", "position", Vector2(42.0, 0.0))
[/codeblock]
</description>
</method>
<method name="call_deferred" qualifiers="vararg">
@ -91,7 +98,10 @@
<argument index="0" name="method" type="String">
</argument>
<description>
Calls the [code]method[/code] on the object during idle time and returns a result. Pass parameters as a comma separated list.
Calls the [code]method[/code] on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
call_deferred("set", "position", Vector2(42.0, 0.0))
[/codeblock]
</description>
</method>
<method name="callv">
@ -102,14 +112,17 @@
<argument index="1" name="arg_array" type="Array">
</argument>
<description>
Calls the [code]method[/code] on the object and returns a result. Pass parameters as an [Array].
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expected all parameters passed via a single [Array].
[codeblock]
callv("set", [ "position", Vector2(42.0, 0.0) ])
[/codeblock]
</description>
</method>
<method name="can_translate_messages" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the object can translate strings.
Returns [code]true[/code] if the object can translate strings. See [method set_message_translation] and [method tr].
</description>
</method>
<method name="connect">
@ -126,9 +139,15 @@
<argument index="4" name="flags" type="int" default="0">
</argument>
<description>
Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call. Use [code]flags[/code] to set deferred or one shot connections. See [code]CONNECT_*[/code] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected. To avoid this, first, use [method is_connected] to check for existing connections.
Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. Use [code]flags[/code] to set deferred or one shot connections. See [enum ConnectFlags] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
Examples:
[codeblock]
connect("pressed", self, "_on_Button_pressed") # BaseButton signal
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
[/codeblock]
</description>
</method>
<method name="disconnect">
@ -151,14 +170,18 @@
<argument index="0" name="signal" type="String">
</argument>
<description>
Emits the given [code]signal[/code].
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
emit_signal("hit", weapon_type, damage)
emit_signal("game_over")
[/codeblock]
</description>
</method>
<method name="free">
<return type="void">
</return>
<description>
Deletes the object from memory.
Deletes the object from memory. Any pre-existing reference to the freed object will now return [code]null[/code].
</description>
</method>
<method name="get" qualifiers="const">
@ -167,7 +190,7 @@
<argument index="0" name="property" type="String">
</argument>
<description>
Returns a [Variant] for a [code]property[/code].
Returns the [Variant] value of the given [code]property[/code].
</description>
</method>
<method name="get_class" qualifiers="const">
@ -182,10 +205,10 @@
</return>
<description>
Returns an [Array] of dictionaries with information about signals that are connected to the object.
Inside each [Dictionary] there are 3 fields:
- "source" is a reference to signal emitter.
- "signal_name" is name of connected signal.
- "method_name" is a name of method to which signal is connected.
Each [Dictionary] contains three String entries:
- [code]source[/code] is a reference to the signal emitter.
- [code]signal_name[/code] is the name of the connected signal.
- [code]method_name[/code] is the name of the method to which the signal is connected.
</description>
</method>
<method name="get_indexed" qualifiers="const">
@ -194,8 +217,7 @@
<argument index="0" name="property" type="NodePath">
</argument>
<description>
Get indexed object property by String.
Property indices get accessed with colon separation, for example: [code]position:x[/code]
Get the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
</description>
</method>
<method name="get_instance_id" qualifiers="const">
@ -212,7 +234,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Returns the object's metadata for the given [code]name[/code].
Returns the object's metadata entry for the given [code]name[/code].
</description>
</method>
<method name="get_meta_list" qualifiers="const">
@ -233,14 +255,15 @@
<return type="Array">
</return>
<description>
Returns the list of properties as an [Array] of dictionaries. Dictionaries contain: name:String, type:int (see TYPE_* enum in [@GlobalScope]) and optionally: hint:int (see PROPERTY_HINT_* in [@GlobalScope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@GlobalScope]).
Returns the object's property list as an [Array] of dictionaries.
Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum @GlobalScope.Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum @GlobalScope.PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum @GlobalScope.PropertyUsageFlags]).
</description>
</method>
<method name="get_script" qualifiers="const">
<return type="Reference">
</return>
<description>
Returns the object's [Script] or [code]null[/code] if one doesn't exist.
Returns the object's [Script] instance, or [code]null[/code] if none is assigned.
</description>
</method>
<method name="get_signal_connection_list" qualifiers="const">
@ -265,7 +288,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Returns [code]true[/code] if a metadata is found with the given [code]name[/code].
Returns [code]true[/code] if a metadata entry is found with the given [code]name[/code].
</description>
</method>
<method name="has_method" qualifiers="const">
@ -296,10 +319,10 @@
<method name="is_class" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="type" type="String">
<argument index="0" name="class" type="String">
</argument>
<description>
Returns [code]true[/code] if the object inherits from the given [code]type[/code].
Returns [code]true[/code] if the object inherits from the given [code]class[/code].
</description>
</method>
<method name="is_connected" qualifiers="const">
@ -319,7 +342,7 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [code]queue_free[/code] method was called for the object.
Returns [code]true[/code] if the [method Node.queue_free] method was called for the object.
</description>
</method>
<method name="notification">
@ -330,13 +353,15 @@
<argument index="1" name="reversed" type="bool" default="false">
</argument>
<description>
Notify the object of something.
Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from.
If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.
</description>
</method>
<method name="property_list_changed_notify">
<return type="void">
</return>
<description>
Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.
</description>
</method>
<method name="remove_meta">
@ -345,6 +370,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Removes a given entry from the object's metadata.
</description>
</method>
<method name="set">
@ -355,7 +381,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Set property into the object.
Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
</description>
</method>
<method name="set_block_signals">
@ -375,7 +401,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Set property into the object, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", [property, value])[/code].
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
</description>
</method>
<method name="set_indexed">
@ -386,6 +412,12 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
[codeblock]
set_indexed("position", Vector2(42, 0))
set_indexed("position:y", -10)
print(position) # (42, -10)
[/codeblock]
</description>
</method>
<method name="set_message_translation">
@ -394,7 +426,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
Define whether the object can translate strings (with calls to [method tr]). Default is [code]true[/code].
Defines whether the object can translate strings (with calls to [method tr]). Default is [code]true[/code].
</description>
</method>
<method name="set_meta">
@ -405,7 +437,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
Adds or changes a given entry in the object's metadata. Metadata are serialized, and can take any [Variant] value.
</description>
</method>
<method name="set_script">
@ -414,7 +446,7 @@
<argument index="0" name="script" type="Reference">
</argument>
<description>
Set a script into the object, scripts extend the object functionality.
Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
</description>
</method>
<method name="to_string">
@ -431,14 +463,15 @@
<argument index="0" name="message" type="String">
</argument>
<description>
Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation].
Translates a message using translation catalogs configured in the Project Settings.
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation].
</description>
</method>
</methods>
<signals>
<signal name="script_changed">
<description>
Emitted whenever the script of the Object is changed.
Emitted whenever the object's script is changed.
</description>
</signal>
</signals>
@ -459,6 +492,7 @@
One shot connections disconnect themselves after emission.
</constant>
<constant name="CONNECT_REFERENCE_COUNTED" value="8" enum="ConnectFlags">
Connect a signal as reference counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left.
</constant>
</constants>
</class>

View file

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Path" inherits="Spatial" category="Core" version="3.2">
<brief_description>
Container for a [Curve3D].
Contains a [Curve3D] path for [PathFollow] nodes to follow.
</brief_description>
<description>
This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info.
Can have [PathFollow] child nodes moving along the [Curve3D]. See [PathFollow] for more information on the usage.
Note that the path is considered as relative to the moved nodes (children of [PathFollow]). As such, the curve should usually start with a zero vector [code](0, 0, 0)[/code].
</description>
<tutorials>
</tutorials>
@ -12,11 +13,13 @@
</methods>
<members>
<member name="curve" type="Curve3D" setter="set_curve" getter="get_curve">
A [Curve3D] describing the path.
</member>
</members>
<signals>
<signal name="curve_changed">
<description>
Emitted when the [member curve] changes.
</description>
</signal>
</signals>

View file

@ -4,8 +4,8 @@
Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
<description>
Can have [PathFollow2D] child-nodes moving along the [Curve2D]. See [PathFollow2D] for more information on this usage.
Note that the path is considered as relative to the moved nodes (children of [PathFollow2D]) - usually the curve should start with a zero vector (0, 0).
Can have [PathFollow2D] child nodes moving along the [Curve2D]. See [PathFollow2D] for more information on the usage.
Note that the path is considered as relative to the moved nodes (children of [PathFollow2D]). As such, the curve should usually start with a zero vector [code](0, 0)[/code].
</description>
<tutorials>
</tutorials>

View file

@ -27,7 +27,7 @@
The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
</member>
<member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow.RotationMode">
Allows or forbids rotation on one or more axes, depending on the constants being used.
Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used.
</member>
<member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset">
The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Performance" inherits="Object" category="Core" version="3.2">
<brief_description>
Exposes performance related data.
Exposes performance-related data.
</brief_description>
<description>
This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [i]Monitor[/i] tab in the editor's [i]Debugger[/i] panel. By using the [method get_monitor] method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build.
@ -16,7 +16,7 @@
<argument index="0" name="monitor" type="int" enum="Performance.Monitor">
</argument>
<description>
Returns the value of one of the available monitors. You should provide one of this class's constants as the argument, like this:
Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this:
[codeblock]
print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console
[/codeblock]
@ -25,13 +25,13 @@
</methods>
<constants>
<constant name="TIME_FPS" value="0" enum="Monitor">
Frames per second.
Number of frames per second.
</constant>
<constant name="TIME_PROCESS" value="1" enum="Monitor">
Time it took to complete one frame.
Time it took to complete one frame, in seconds.
</constant>
<constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor">
Time it took to complete one physics frame.
Time it took to complete one physics frame, in seconds.
</constant>
<constant name="MEMORY_STATIC" value="3" enum="Monitor">
Static memory currently used, in bytes. Not available in release builds.
@ -58,6 +58,7 @@
Number of nodes currently instanced in the scene tree. This also includes the root node.
</constant>
<constant name="OBJECT_ORPHAN_NODE_COUNT" value="11" enum="Monitor">
Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree.
</constant>
<constant name="RENDER_OBJECTS_IN_FRAME" value="12" enum="Monitor">
3D objects drawn per frame.
@ -78,15 +79,16 @@
Draw calls per frame. 3D only.
</constant>
<constant name="RENDER_VIDEO_MEM_USED" value="18" enum="Monitor">
Video memory used. Includes both texture and vertex memory.
The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
<constant name="RENDER_TEXTURE_MEM_USED" value="19" enum="Monitor">
Texture memory used.
The amount of texture memory used.
</constant>
<constant name="RENDER_VERTEX_MEM_USED" value="20" enum="Monitor">
Vertex memory used.
The amount of vertex memory used.
</constant>
<constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="21" enum="Monitor">
Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
</constant>
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="22" enum="Monitor">
Number of active [RigidBody2D] nodes in the game.
@ -107,8 +109,10 @@
Number of islands in the 3D physics engine.
</constant>
<constant name="AUDIO_OUTPUT_LATENCY" value="28" enum="Monitor">
Output latency of the [AudioServer].
</constant>
<constant name="MONITOR_MAX" value="29" enum="Monitor">
Represents the size of the [enum Monitor] enum.
</constant>
</constants>
</class>

View file

@ -1390,7 +1390,7 @@
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected allong the swing axis.
Could be defined as looseness in the [ConeTwistJoint].
If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code].
If below 0.05, this behavior is locked. Default value: [code]PI/4[/code].
</constant>
<constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1" enum="ConeTwistJointParam">
Twist is the rotation around the twist axis, this value defined how far the joint can twist.

View file

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Reference" inherits="Object" category="Core" version="3.2">
<brief_description>
Base class for anything that keeps a reference count.
Base class for reference-counted objects.
</brief_description>
<description>
Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use.
Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class.
References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
</description>
<tutorials>
</tutorials>
@ -13,20 +15,24 @@
<return type="bool">
</return>
<description>
Initializes the internal reference counter. Use this only if you really know what you are doing.
Returns whether the initialization was successful.
</description>
</method>
<method name="reference">
<return type="bool">
</return>
<description>
Increase the internal reference counter. Use this only if you really know what you are doing.
Increments the internal reference counter. Use this only if you really know what you are doing.
Returns whether the increment was successful.
</description>
</method>
<method name="unreference">
<return type="bool">
</return>
<description>
Decrease the internal reference counter. Use this only if you really know what you are doing.
Decrements the internal reference counter. Use this only if you really know what you are doing.
Returns whether the decrement was successful.
</description>
</method>
</methods>

View file

@ -72,6 +72,7 @@
<signals>
<signal name="changed">
<description>
Emitted whenever the resource changes.
</description>
</signal>
</signals>

View file

@ -5,6 +5,7 @@
</brief_description>
<description>
Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene.
This class cannot be instantiated directly, it is retrieved for a given scene as the result of [method PackedScene.get_state].
</description>
<tutorials>
</tutorials>
@ -23,6 +24,7 @@
</return>
<description>
Returns the number of signal connections in the scene.
The [code]idx[/code] argument used to query connection metadata in other [code]get_connection_*[/code] methods in the interval [code][0, get_connection_count() - 1][/code].
</description>
</method>
<method name="get_connection_flags" qualifiers="const">
@ -31,7 +33,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the flags for the signal at [code]idx[/code]. See [Object]'s [code]CONNECT_*[/code] flags.
Returns the connection flags for the signal at [code]idx[/code]. See [enum Object.ConnectFlags] constants.
</description>
</method>
<method name="get_connection_method" qualifiers="const">
@ -75,6 +77,7 @@
</return>
<description>
Returns the number of nodes in the scene.
The [code]idx[/code] argument used to query node data in other [code]get_node_*[/code] methods in the interval [code][0, get_node_count() - 1][/code].
</description>
</method>
<method name="get_node_groups" qualifiers="const">
@ -92,6 +95,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
</description>
</method>
<method name="get_node_instance" qualifiers="const">
@ -100,7 +104,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the scene for the node at [code]idx[/code] or [code]null[/code] if the node is not an instance.
Returns a [PackedScene] for the node at [code]idx[/code] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance.
</description>
</method>
<method name="get_node_instance_placeholder" qualifiers="const">
@ -139,6 +143,7 @@
</argument>
<description>
Returns the path to the node at [code]idx[/code].
If [code]for_parent[/code] is [code]true[/code], returns the path of the [code]idx[/code] node's parent instead.
</description>
</method>
<method name="get_node_property_count" qualifiers="const">
@ -148,6 +153,7 @@
</argument>
<description>
Returns the number of exported or overridden properties for the node at [code]idx[/code].
The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code].
</description>
</method>
<method name="get_node_property_name" qualifiers="const">

View file

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SceneTree" inherits="MainLoop" category="Core" version="3.2">
<brief_description>
SceneTree manages a hierarchy of nodes.
Manages the game loop via a hierarchy of nodes.
</brief_description>
<description>
As one of the most important classes, the [SceneTree] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. You can also use the SceneTree to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once.
As one of the most important classes, the [SceneTree] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded.
You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once.
[SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scene_tree.html</link>
@ -41,7 +43,8 @@
<argument index="0" name="path" type="String">
</argument>
<description>
Changes to the scene at the given [code]path[/code].
Changes the running scene to the one at the given [code]path[/code], after loading it into a [PackedScene] and creating a new instance.
Returns [constant @GlobalScope.OK] on success, [constant @GlobalScope.ERR_CANT_OPEN] if the [code]path[/code] cannot be loaded into a [PackedScene], or [constant @GlobalScope.ERR_CANT_CREATE] if that scene cannot be instantiated.
</description>
</method>
<method name="change_scene_to">
@ -50,7 +53,8 @@
<argument index="0" name="packed_scene" type="PackedScene">
</argument>
<description>
Changes to the given [PackedScene].
Changes the running scene to a new instance of the given [PackedScene].
Returns [constant @GlobalScope.OK] on success or [constant @GlobalScope.ERR_CANT_CREATE] if the scene cannot be instantiated.
</description>
</method>
<method name="create_timer">
@ -61,7 +65,7 @@
<argument index="1" name="pause_mode_process" type="bool" default="true">
</argument>
<description>
Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this SceneTree. If [code]pause_mode_process[/code] is set to [code]false[/code], pausing the SceneTree will also pause the timer.
Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]pause_mode_process[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
Commonly used to create a one-shot delay timer as in the following example:
[codeblock]
func some_function():
@ -75,28 +79,28 @@
<return type="int">
</return>
<description>
Returns the current frame, i.e. number of frames since the application started.
Returns the current frame number, i.e. the total frame count since the application started.
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
<return type="PoolIntArray">
</return>
<description>
Returns the peer IDs of all connected peers of this SceneTree's [member network_peer].
Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer].
</description>
</method>
<method name="get_network_unique_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the unique peer ID of this SceneTree's [member network_peer].
Returns the unique peer ID of this [SceneTree]'s [member network_peer].
</description>
</method>
<method name="get_node_count" qualifiers="const">
<return type="int">
</return>
<description>
Returns the number of nodes in this SceneTree.
Returns the number of nodes in this [SceneTree].
</description>
</method>
<method name="get_nodes_in_group">
@ -105,7 +109,7 @@
<argument index="0" name="group" type="String">
</argument>
<description>
Returns all nodes assigned to the given group.
Returns a list of all nodes assigned to the given group.
</description>
</method>
<method name="get_rpc_sender_id" qualifiers="const">
@ -135,14 +139,14 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the most recent InputEvent was marked as handled with [method set_input_as_handled].
Returns [code]true[/code] if the most recent [InputEvent] was marked as handled with [method set_input_as_handled].
</description>
</method>
<method name="is_network_server" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this SceneTree's [member network_peer] is in server mode (listening for connections).
Returns [code]true[/code] if this [SceneTree]'s [member network_peer] is in server mode (listening for connections).
</description>
</method>
<method name="notify_group">
@ -190,6 +194,7 @@
</return>
<description>
Reloads the currently active scene.
Returns an [enum @GlobalScope.Error] code as described in [method change_scene], with the addition of [constant @GlobalScope.ERR_UNCONFIGURED] if no [member current_scene] was defined yet.
</description>
</method>
<method name="set_auto_accept_quit">
@ -198,7 +203,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
If [code]true[/code], the application automatically accepts quitting.
If [code]true[/code], the application automatically accepts quitting. Defaults to [code]true[/code].
</description>
</method>
<method name="set_group">
@ -233,7 +238,7 @@
<return type="void">
</return>
<description>
Marks the most recent input event as handled.
Marks the most recent [InputEvent] as handled.
</description>
</method>
<method name="set_quit_on_go_back">
@ -242,7 +247,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
If [code]true[/code], the application quits automatically on going back (e.g. on Android).
If [code]true[/code], the application quits automatically on going back (e.g. on Android). Defaults to [code]true[/code].
</description>
</method>
<method name="set_screen_stretch">
@ -257,7 +262,7 @@
<argument index="3" name="shrink" type="float" default="1">
</argument>
<description>
Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and [code]shrink[/code].
Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and [code]shrink[/code] ratio.
</description>
</method>
</methods>
@ -266,34 +271,34 @@
The current scene.
</member>
<member name="debug_collisions_hint" type="bool" setter="set_debug_collisions_hint" getter="is_debugging_collisions_hint">
If [code]true[/code], collision shapes will be visible when running the game from the editor for debugging purposes.
</member>
<member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint">
If [code]true[/code], navigation polygons will be visible when running the game from the editor for debugging purposes.
</member>
<member name="edited_scene_root" type="Node" setter="set_edited_scene_root" getter="get_edited_scene_root">
The root of the edited scene.
</member>
<member name="multiplayer" type="MultiplayerAPI" setter="set_multiplayer" getter="get_multiplayer">
The default [MultiplayerAPI] instance for this SceneTree.
The default [MultiplayerAPI] instance for this [SceneTree].
</member>
<member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled">
If [code]true[/code], (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame].
If [code]true[/code] (default value), enable the automatic polling of the [MultiplayerAPI] for this [SceneTree] during [signal idle_frame].
When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals.
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals.
</member>
<member name="paused" type="bool" setter="set_pause" getter="is_paused">
If [code]true[/code], the SceneTree is paused.
Doing so will have the following behavior:
* 2D and 3D physics will be stopped.
* _process and _physics_process will not be called anymore in nodes.
* _input and _input_event will not be called anymore either.
If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior:
- 2D and 3D physics will be stopped.
- [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes.
</member>
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections">
If [code]true[/code], the SceneTree's [member network_peer] refuses new incoming connections.
If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections.
</member>
<member name="root" type="Viewport" setter="" getter="get_root">
The SceneTree's [Viewport].
The [SceneTree]'s root [Viewport].
</member>
<member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling">
If [code]true[/code], font oversampling is used.
@ -302,12 +307,12 @@
<signals>
<signal name="connected_to_server">
<description>
Emitted whenever this SceneTree's [member network_peer] successfully connected to a server. Only emitted on clients.
Emitted whenever this [SceneTree]'s [member network_peer] successfully connected to a server. Only emitted on clients.
</description>
</signal>
<signal name="connection_failed">
<description>
Emitted whenever this SceneTree's [member network_peer] fails to establish a connection to a server. Only emitted on clients.
Emitted whenever this [SceneTree]'s [member network_peer] fails to establish a connection to a server. Only emitted on clients.
</description>
</signal>
<signal name="files_dropped">
@ -316,33 +321,33 @@
<argument index="1" name="screen" type="int">
</argument>
<description>
Emitted whenever files are drag-and-dropped onto the window.
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</signal>
<signal name="idle_frame">
<description>
Emitted immediately before [method Node._process] is called on every node in the SceneTree.
Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
</description>
</signal>
<signal name="network_peer_connected">
<argument index="0" name="id" type="int">
</argument>
<description>
Emitted whenever this SceneTree's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1).
Emitted whenever this [SceneTree]'s [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1).
</description>
</signal>
<signal name="network_peer_disconnected">
<argument index="0" name="id" type="int">
</argument>
<description>
Emitted whenever this SceneTree's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
Emitted whenever this [SceneTree]'s [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
</description>
</signal>
<signal name="node_added">
<argument index="0" name="node" type="Node">
</argument>
<description>
Emitted whenever a node is added to the SceneTree.
Emitted whenever a node is added to the [SceneTree].
</description>
</signal>
<signal name="node_configuration_warning_changed">
@ -356,18 +361,19 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
Emitted whenever a node is removed from the SceneTree.
Emitted whenever a node is removed from the [SceneTree].
</description>
</signal>
<signal name="node_renamed">
<argument index="0" name="node" type="Node">
</argument>
<description>
Emitted whenever a node is renamed.
</description>
</signal>
<signal name="physics_frame">
<description>
Emitted immediately before [method Node._physics_process] is called on every node in the SceneTree.
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
</description>
</signal>
<signal name="screen_resized">
@ -377,12 +383,12 @@
</signal>
<signal name="server_disconnected">
<description>
Emitted whenever this SceneTree's [member network_peer] disconnected from server. Only emitted on clients.
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
</description>
</signal>
<signal name="tree_changed">
<description>
Emitted whenever the SceneTree hierarchy changed (children being moved or renamed, etc.).
Emitted whenever the [SceneTree] hierarchy changed (children being moved or renamed, etc.).
</description>
</signal>
</signals>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="UndoRedo" inherits="Object" category="Core" version="3.2">
<brief_description>
Helper to manage UndoRedo in the editor or custom tools.
Helper to manage undo/redo operations in the editor or custom tools.
</brief_description>
<description>
Helper to manage UndoRedo in the editor or custom tools. It works by registering methods and property changes inside 'actions'.
Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside 'actions'.
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
Here's an example on how to add an action to Godot editor's own 'undoredo':
Here's an example on how to add an action to the Godot editor's own [UndoRedo], from a plugin:
[codeblock]
var undo_redo = get_undo_redo() # Method of EditorPlugin.
@ -137,7 +137,7 @@
<return type="int">
</return>
<description>
Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically.
Get the version, each time a new action is committed, the version number of the [UndoRedo] is increased automatically.
This is useful mostly to check if something changed from a saved version.
</description>
</method>
@ -145,7 +145,7 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if an 'redo' action is available.
Returns [code]true[/code] if a 'redo' action is available.
</description>
</method>
<method name="has_undo">
@ -159,20 +159,21 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [UndoRedo] is currently committing the action, i.e. running its 'do' method or property change (see [method commit_action]).
</description>
</method>
<method name="redo">
<return type="bool">
</return>
<description>
Redo last action.
Redo the last action.
</description>
</method>
<method name="undo">
<return type="bool">
</return>
<description>
Undo last action.
Undo the last action.
</description>
</method>
</methods>
@ -185,10 +186,10 @@
</signals>
<constants>
<constant name="MERGE_DISABLE" value="0" enum="MergeMode">
Makes [code]do[/code]/[code]undo[/code] operations stay in separate actions.
Makes 'do'/'undo' operations stay in separate actions.
</constant>
<constant name="MERGE_ENDS" value="1" enum="MergeMode">
Makes so that the action's [code]do[/code] operation is from the first action created and the [code]undo[/code] operation is from the last subsequent action with the same name.
Makes so that the action's 'do' operation is from the first action created and the 'undo' operation is from the last subsequent action with the same name.
</constant>
<constant name="MERGE_ALL" value="2" enum="MergeMode">
Makes subsequent actions with the same name be merged into one.

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.2">
<brief_description>
Physics body that simulates the behaviour of a car.
Physics body that simulates the behavior of a car.
</brief_description>
<description>
This nodes implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape] for the main body of your vehicle and add [VehicleWheel] nodes for the wheels. You should also add a [MeshInstance] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly.

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.2">
<brief_description>
Physics object that simulates the behaviour of a wheel.
Physics object that simulates the behavior of a wheel.
</brief_description>
<description>
This node needs to be used as a child node of [VehicleBody] and simulates the behaviour of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
This node needs to be used as a child node of [VehicleBody] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
</description>
<tutorials>
</tutorials>

View file

@ -4388,9 +4388,10 @@
The amount of draw calls in frame.
</constant>
<constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="6" enum="RenderInfo">
Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
</constant>
<constant name="INFO_VIDEO_MEM_USED" value="7" enum="RenderInfo">
The amount of vertex memory and texture memory used.
The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
<constant name="INFO_TEXTURE_MEM_USED" value="8" enum="RenderInfo">
The amount of texture memory used.