Godot version:
08d3d06
Issue description:
This doesn't work:
connect("body_entered", Callable(self, "entered"))
You need to use StringName explicitly:
connect("body_entered", Callable(self, StringName("entered")))
Strings used to be converted automatically.
Note that you should be able to use &"entered" (or was it ^"entered" or @"entered"?) as a shorthand for StringName("entered"). Still, I agree it should be converted implicitly.
Note that you should be able to use
&"entered"(or was it^"entered"or@"entered"?)
&"entered". I memorized as it looks like C references. And @ is for @nnotations only. :smiley:
This is mostly a problem with Variant that now treats String and StringName as different entities. So you should get used to the shorthand &"entered" to create a StringName.
This could be converted automatically when applicable so I will add that. Just note that in many cases the parser cannot infer the type, so it's not always possible to do the conversion.
Also, you don't need strings for this anymore as this:
body_entered.connect(entered)
does the same thing.
Fixed in #41359
Most helpful comment
Note that you should be able to use
&"entered"(or was it^"entered"or@"entered"?) as a shorthand forStringName("entered"). Still, I agree it should be converted implicitly.