|
@@ -19,7 +19,7 @@
|
|
<param index="1" name="method" type="StringName" />
|
|
<param index="1" name="method" type="StringName" />
|
|
<description>
|
|
<description>
|
|
Calls [param method] on each member of the given group. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
|
|
Calls [param method] on each member of the given group. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
|
|
- [b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
|
|
|
|
|
|
+ [b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="call_group_flags" qualifiers="vararg">
|
|
<method name="call_group_flags" qualifiers="vararg">
|
|
@@ -33,7 +33,7 @@
|
|
# Call the method in a deferred manner and in reverse order.
|
|
# Call the method in a deferred manner and in reverse order.
|
|
get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE)
|
|
get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE)
|
|
[/codeblock]
|
|
[/codeblock]
|
|
- [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param flags] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred].
|
|
|
|
|
|
+ [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param flags] argument, methods will be called at the end of the frame in a way similar to [method Object.set_deferred].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="change_scene_to_file">
|
|
<method name="change_scene_to_file">
|
|
@@ -42,7 +42,7 @@
|
|
<description>
|
|
<description>
|
|
Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance.
|
|
Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance.
|
|
Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated.
|
|
Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated.
|
|
- [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. This ensures that both scenes are never loaded at the same time, which can exhaust system resources if the scenes are too large or if running in a memory constrained environment. As such, you won't be able to access the loaded scene immediately after the [method change_scene_to_file] call.
|
|
|
|
|
|
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added to the tree at the end of the frame. This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to [method Node.queue_free]. As such, you won't be able to access the loaded scene immediately after the [method change_scene_to_file] call.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="change_scene_to_packed">
|
|
<method name="change_scene_to_packed">
|
|
@@ -51,7 +51,7 @@
|
|
<description>
|
|
<description>
|
|
Changes the running scene to a new instance of the given [PackedScene] (which must be valid).
|
|
Changes the running scene to a new instance of the given [PackedScene] (which must be valid).
|
|
Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid.
|
|
Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid.
|
|
- [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to_packed] call.
|
|
|
|
|
|
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added to the tree at the end of the frame. You won't be able to access it immediately after the [method change_scene_to_packed] call.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="create_timer">
|
|
<method name="create_timer">
|
|
@@ -143,7 +143,7 @@
|
|
<param index="1" name="notification" type="int" />
|
|
<param index="1" name="notification" type="int" />
|
|
<description>
|
|
<description>
|
|
Sends the given notification to all members of the [param group].
|
|
Sends the given notification to all members of the [param group].
|
|
- [b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use [method notify_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
|
|
|
|
|
|
+ [b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification to lots of members.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="notify_group_flags">
|
|
<method name="notify_group_flags">
|
|
@@ -153,14 +153,14 @@
|
|
<param index="2" name="notification" type="int" />
|
|
<param index="2" name="notification" type="int" />
|
|
<description>
|
|
<description>
|
|
Sends the given notification to all members of the [param group], respecting the given [enum GroupCallFlags].
|
|
Sends the given notification to all members of the [param group], respecting the given [enum GroupCallFlags].
|
|
- [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code].
|
|
|
|
|
|
+ [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, notifications will be sent at the end of the current frame in a way similar to using [code]Object.call_deferred("notification", ...)[/code].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="queue_delete">
|
|
<method name="queue_delete">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="obj" type="Object" />
|
|
<param index="0" name="obj" type="Object" />
|
|
<description>
|
|
<description>
|
|
- Queues the given object for deletion, delaying the call to [method Object.free] to after the current frame.
|
|
|
|
|
|
+ Queues the given object for deletion, delaying the call to [method Object.free] to the end of the current frame.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="quit">
|
|
<method name="quit">
|
|
@@ -187,7 +187,7 @@
|
|
<param index="2" name="value" type="Variant" />
|
|
<param index="2" name="value" type="Variant" />
|
|
<description>
|
|
<description>
|
|
Sets the given [param property] to [param value] on all members of the given group.
|
|
Sets the given [param property] to [param value] on all members of the given group.
|
|
- [b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use [method set_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
|
|
|
|
|
|
+ [b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="set_group_flags">
|
|
<method name="set_group_flags">
|
|
@@ -198,7 +198,7 @@
|
|
<param index="3" name="value" type="Variant" />
|
|
<param index="3" name="value" type="Variant" />
|
|
<description>
|
|
<description>
|
|
Sets the given [param property] to [param value] on all members of the given group, respecting the given [enum GroupCallFlags].
|
|
Sets the given [param property] to [param value] on all members of the given group, respecting the given [enum GroupCallFlags].
|
|
- [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred].
|
|
|
|
|
|
+ [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, properties will be set at the end of the frame in a way similar to [method Object.call_deferred].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="set_multiplayer">
|
|
<method name="set_multiplayer">
|
|
@@ -310,7 +310,7 @@
|
|
Call a group in reverse scene order.
|
|
Call a group in reverse scene order.
|
|
</constant>
|
|
</constant>
|
|
<constant name="GROUP_CALL_DEFERRED" value="2" enum="GroupCallFlags">
|
|
<constant name="GROUP_CALL_DEFERRED" value="2" enum="GroupCallFlags">
|
|
- Call a group with a one-frame delay (idle frame, not physics).
|
|
|
|
|
|
+ Call a group at the end of the current frame (process or physics).
|
|
</constant>
|
|
</constant>
|
|
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
|
|
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
|
|
Call a group only once even if the call is executed many times.
|
|
Call a group only once even if the call is executed many times.
|