Open albinaask opened 8 months ago
So when you press 'Connect' the following chain of events is happening:
Object::connect()
checks if the supplied callable is valid.line_is_edited()
). In this case the check is against Object::script_instance
.Object::script_instance
is instantiated with PlaceHolderScriptInstance
class instance.PlaceHolderScriptInstance::has_method()
calls has_method()
on attached script (GDScript
in this case).GDScript::has_method()
only checks if it has the supplied method in its own method list and doesn't check its parent methods. And this causes the error.Marking a script with @tools
helps to execute it in editor and thus - fixes the error. But the bound method is not being called. Whether it is intended - requires further investigation.
Tested versions
4.2.1 Stable
System information
Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 620 (Intel Corporation; 30.0.101.1338) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)
Issue description
Just like adding an extra value to a script that is put on a node works, instead directing it onto a method that is in a superclass that is written in GDScript should work.
The picture above shows the setup:
Steps to reproduce
Minimal reproduction project (MRP)
error project.zip