Is here any way to prevent receiving connecting any signals? I've tried to remove nodes from tree and keep them in memory, but they still receiving connected signals. Afaik, removing node from tree stops any activity from node.
How pause node activity? in particular, blocking receiving signals.
Can't you use disconnect?
@fire7side said: Can't you use disconnect?
i could, but is here any different workaround?
Unfortunately, there is currently no way to pause a specific node. If it is a custom signal, what you can do is check for a boolean and then, if the boolean isn’t true
, ignore sending the signal or processing the received signal, depending on the use case. I generally piggyback off the visible
property when I am trying to detect whether to process a signal, but this doesn’t work for all cases.
- Edited
If your node has logic in process() or physics_process() then you can always disable those. Enable whichever/both again when you need to. As for the signals, could always make a an if statement check to see if they are processing else pass.
Is there a way to disable the script of a node then? Like detach script/add script...?