Document null argument limitation with `SceneTree.call_group()`

This commit is contained in:
Hugo Locurcio 2021-10-07 18:54:55 +02:00
parent 7a145ff8c7
commit 761047076c
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@
<description>
Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag.
[b]Note:[/b] [code]method[/code] may only have 5 arguments at most (7 arguments passed to this method in total).
[b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code].
[b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag.
</description>
</method>
@ -31,8 +32,10 @@
<description>
Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
[b]Note:[/b] [code]method[/code] may only have 5 arguments at most (8 arguments passed to this method in total).
[b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code].
[codeblock]
get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") # Call the method immediately and in reverse order.
# Call the method immediately and in reverse order.
get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy")
[/codeblock]
</description>
</method>