diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index b2594b2dc0..eac0529242 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -825,9 +825,14 @@ void Director::runWithScene(Scene *scene) void Director::replaceScene(Scene *scene) { - CCASSERT(_runningScene, "Use runWithScene: instead to start the director"); + //CCASSERT(_runningScene, "Use runWithScene: instead to start the director"); CCASSERT(scene != nullptr, "the scene should not be null"); + if (_runningScene == nullptr) { + runWithScene(scene); + return; + } + if (scene == _nextScene) return;