Pause node issue

Pause node issue

I am trying to unschedule update function of one specific node to pause it, but i have a lot of problems with that. This is the approach that i am using:

var scheduler = cc.director.getScheduler();

I also tried:

var scheduler = cc.director.getScheduler();

Do anyone have idea what i am doing wrong ?

Thanks in advance for your help :slight_smile:


I’m also having problem when trying to pause a node tree recursively on Cocos Creator 1.9.3.
I use:

but it still calls update method.


Component class has it’s own update function. This function is called without scheduling in the scheduler. Maybe, this is your problem.
P.S. to turn off this update() use enable property.

1 Like

@FocusCreative please don’t cross-post in multiple topics.

@Postelzhuk thank you for replying.

1 Like

Thanks. I’ve manually set update methods to empty function and restore on resume.

I thought JS and Cocos Creator as seperate categories. Will be careful next time. Thanks.


They are, but they don’t overlap as much as one might think. Creator API is different from the JS API mostly. Some concepts still apply though. Enjoy your day.