Signal.is_null() method isn't describing what the function is actually doing #9831
Labels
area:class reference
Issues and PRs about the class reference, which should be addressed on the Godot engine repository
enhancement
Godot version is 4.3
I was trying to detect if a signal has a valid object linked to it, reading the doc I ended up on the Signal.is_null() method which states "Returns
true
if the signal's name does not exist in its object, or the object is not valid." It appears to not describe the actual logic of the method. I experimented with it and someone pointed to me that the source code for this function isI don't really know how the engine source code is structured and can't verify that myself but here is the test I performed
It seems like for the
Signal.is_null()
method to return true both the object and the signal name must be invalid, in my case the signal still has a name but is not attached to an object anymoreHere's the link to the method in the documentation : https://docs.godotengine.org/en/stable/classes/class_signal.html#class-signal-method-is-null
The text was updated successfully, but these errors were encountered: