0 votes

in the callback of signal, there's no way to get the sender of the signal unless connect by code and bind the sender .
I wonder why the sender is missed by default in Godot.

in Engine by (264 points)
recategorized by

hm... as just quick guess, every callback function should have a parameter for sender than, even though it's really unnecessary.
I think you know how to get which sender emits the signal, what bothers you to use script to connect signal?

what bothers you to use script to connect signal?
lazy :)

all technologies have event dispatchers references passed automatically. It's weird we have to define a new signal to have access to it...

1 Answer

0 votes

Connection window allow extra bindings but these are constant values, since these connections are made by hand on the editor you don't need the path or ID, you know what is connecting.

Like, you have 2 areas, bind one with the integer 1, the other with 2, you made it and you know which is which to process the callback.

by (7,934 points)

You have to redefine new signal to pass extra parameters. Understood. But in my case, The event body_entered triggered have only one parameter (the body that has entered the area and have no way to know on which Area has entered...

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.