issue #5253: move cc.loader.resPath to ctor & onExit