Godot version:
40d1b0b
OS/device including version:
Ubuntu 18.04 64bit
Issue description:
Using SceneTree.call_group() will perform in-explicitly a deferred call. This behavior is not described in any documentation and can lead to potential function misuse.
I'm not sure but I assume it should be changed to just perform call normally for consistency (the same way how we have node.call() and node.call_deferred() functions, we would have SceneTree.call_group() and SceneTree.call_group_flags()).
Worth to notice this change could potentially break compatibility.
Steps to reproduce:
Manual:
func some_function(): print("performing GroupCallReceiver function") insidefunc _ready():
get_tree().call_group("GroupCallReceiver", "some_function")
print("After doing a call_group()")
Automatic:
Minimal reproduction project:
call_group_deferred.zip
Hello @kubecz3k this is not a bug, indeed call_group is by default executed on an idle/deferred time. For realtime group call you should use the method "call_group_flags" and use the GROUP_CALL_REALTIME enumerator.
It might be worth changing this in 4.0 for consistency, but I wonder why it's deferred by default in the first place.
Most helpful comment
It might be worth changing this in 4.0 for consistency, but I wonder why it's deferred by default in the first place.