From 7e261128520aae7e862ceb5e6a408bccadfb2e33 Mon Sep 17 00:00:00 2001 From: zxg0622 <247274249@qq.com> Date: Wed, 8 Jan 2020 15:50:14 +0800 Subject: [PATCH] fix modelcomponent attach scene bug (#6056) --- cocos/core/3d/framework/model-component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/core/3d/framework/model-component.ts b/cocos/core/3d/framework/model-component.ts index 626a69071d..2a7c8f17ab 100644 --- a/cocos/core/3d/framework/model-component.ts +++ b/cocos/core/3d/framework/model-component.ts @@ -177,7 +177,7 @@ export class ModelComponent extends RenderableComponent { } protected _attachToScene () { - if (!this.node.scene && !this._model) { + if (!this.node.scene || !this._model) { return; } const scene = this._getRenderScene();