Closed
Description
Godot version
master, e3e2528
System information
linux
Issue description
Creating this issue to keep track of something discovered while working working on #79005.
Basically, in some places Godot has checks for object
as a way to check if a callable is valid. This seems wrong, especially for custom callables, which may not actually have an associated object. While this doesn't seem to be a problem within the engine itself, it can be a problem for extensions. In my extension I had to use a workaround that creates an object that exists for no reason other than to pass those checks.
Here are some examples of object-less callables being rejected:
I haven't looked to see if there are more cases (I merely searched object.cpp
for get_object()
).
Original comments from #79005:
- Allow CallableCustom objects to be created from GDExtensions #79005 (comment)
- Allow CallableCustom objects to be created from GDExtensions #79005 (comment)
Steps to reproduce
N/A
Minimal reproduction project
N/A