You can get the list of signals with get_signal_list
:
var signals = node.get_signal_list();
for cur_signal in signals:
print(cur_signal.name);
Then you can get the list of connections for each one with get_signal_connection_list
to find where those signals are connected to:
var signals = node.get_signal_list();
for cur_signal in signals:
var conns = node.get_signal_connection_list(cur_signal.name);
for cur_conn in conns:
print(cur_conn.signal);
print(cur_conn.target);
print(cur_conn.method);
That is the information of signal connections that connect from an object. Which you need to disconnect them:
node.disconnect(cur_conn.signal, cur_conn.target, cur_conn.method)
On the other hand, if you want the information of signal connections that connect to an object, you can use get_incoming_connections
instead:
var conns = node.get_incoming_connections();
for cur_conn in conns:
print(cur_conn.signal_name);
print(cur_conn.source);
print(cur_conn.method_name);
Disconnecting them would be:
cur_conn.source.disconnect(cur_conn.signal_name, node, cur_conn.method_name)