Ericdowney / SignalVisualizer

A plugin for Godot 4.x. SignalVisualizer displays the current scene's signals and connections in a easy to read graph and tree dock.
MIT License
366 stars 10 forks source link

Cannot detected the signals using code with "connect" #4

Closed dreanzy closed 9 months ago

dreanzy commented 10 months ago

Describe the bug Cannot detected the signals using code with "connect" like this:

func _ready():
    $Timer.timeout.connect(on_timer_timeout)

And thans for making the plugin.

tehelka-gamedev commented 10 months ago

I realised the same thing while testing it today. The thing is that the code uses the method get_signal_connection_list which returns an empty list [] for cases like this. In your example, the _ready() function is called only when the node is created during the game, but then in the editor the signal is not connected. I guess the addon code would need to be rewrote to analyse the GDScript files to make it work ? But that can be tricky, as some signals connections can happen during the game or depending on some conditions.

Ericdowney commented 9 months ago

Hey! Sorry for the late response. Tehekla is correct. The signal connections are scanned at the time the generate graph button is pressed and it looks at the scene in the editor.

Dynamic signals are on my roadmap but does not work right now. I'm going to close out this issue but I'll create an enhancement issue to address this.

Ericdowney commented 9 months ago

SignalDebugger enhancement https://github.com/Ericdowney/SignalVisualizer/issues/5