Small Godot Update to connect()

In Godot 4, when using the connect() call to connect signals in code:

Instead of:

visible_notifier.connect("screen_exited", _on_screen_exited)

We use:

visible_notifier.screen_exited.connect(_on_screen_exited)
3 Likes

nice one, cheers for the update on it, havent used it since going through course

Can I ask what the difference is between passing two arguments versus using the dot operator to attach the process?
Both work as I just worked through this video and found this post. I like the way yours is written slightly more as I get to skip using the quotation marks and comma, so it feels slightly faster to write.
Thanks for the input though I appreciate seeing different ways to code the same things.

Privacy & Terms