scheduleOnce gone

Now that scheduleOnce is gone, how do we go about scheduling something one time and then running another callback once that schedule is done?

you can use javascript setTimeout call, or do it through actions:

someActiveNode.runAction(cc.sequence(
cc.delayTime(timeout),
cc.callFunc(callback),
))

thanks, i’d rather avoid setTimeout

your solution looks like a good one,

I’ve also done this -

cc.director.getScheduler().schedule(() => myfunc(parameter), this, 0, 0, 0, false);
function myfunc(paramter) {
    /* code*/
    callback()
}
function callback () {}

apparently I was wrong also about scheduleOnce being removed, as I found it’s still possible to use it via the cc_Component class and anything that extends it