BenjaminUC 0 Posted April 2, 2020 Hi, It is easy to add/register a new EventListener with: getClient().getInstance().addEventListener(listener); However, I haven't been able to find where to unregister it again. I am aware of the many removeXListener methods in the Canvas class Specifically I'm registering PaintListener's dynamically based on the current executing Node. (I'm using my own custom Node structure not TaskNode) It seems that when you stop and start the script, the previous registered listeners are still registered and thus not removed when the script is stopped. How and where do you unregister an EventListener (PaintListener)?
Jort 2 Posted May 1, 2021 I have the same problem, paint gets drawn twice when script is restarted. I dirty-solved it by creating a new method in my custom painter class which 'disables' it, which I call in onExit()
Recommended Posts
Archived
This topic is now archived and is closed to further replies.