From f9f7171c4ce1ae5e7cfee899fdc89585c7b4a570 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 30 Dec 2019 17:50:59 +0800 Subject: [PATCH] Fix director.root not initialized in splash image (#6006) --- cocos/core/game.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cocos/core/game.ts b/cocos/core/game.ts index 00e0fed155..a948476e97 100644 --- a/cocos/core/game.ts +++ b/cocos/core/game.ts @@ -581,7 +581,6 @@ export class Game extends EventTarget { if (cb) { cb(); } }; - // Init engine this._initEngine(start); } @@ -595,6 +594,10 @@ export class Game extends EventTarget { this._initEvents(); } + // Log engine version + console.log('Cocos Creator 3D v' + cc.ENGINE_VERSION); + this.emit(Game.EVENT_ENGINE_INITED); + // load renderpipeline let config = this.config; cc.loader.load({ uuid: config.renderPipeline }, (err, asset) => { @@ -620,10 +623,6 @@ export class Game extends EventTarget { cb && cb(); } }); - - // Log engine version - console.log('Cocos Creator 3D v' + cc.ENGINE_VERSION); - this.emit(Game.EVENT_ENGINE_INITED); } // @Methods