调用cc.director.loadScene( ),报错onBeforeLoadScene is not a function

Uncaught TypeError: onBeforeLoadScene is not a function
at 51.cc.Director.runSceneImmediate (CCDirector.js:458)
at CCDirector.js:658
at CCLoader. (CCAssetLibrary.js:114)
at CCLoader.js:273
at utils.js:79

是不是因为引擎cc.Director.runScene的用法被取消后,代码没有及时更新?

找到问题了,是cc.director.loadScene多传了一个this参数

出这种问题都是因为没用类型系统
用了TS就不会写出这种错误 :kissing_heart: