浏览代码

If not use extra(no DebugLayer) it will be error.

KK 9 年之前
父节点
当前提交
42eade7b6a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/babylon.engine.ts

+ 1 - 1
src/babylon.engine.ts

@@ -838,7 +838,7 @@
 
             for (var index = 0; index < this.scenes.length; index++) {
                 var scene = this.scenes[index];
-                if (scene.debugLayer.isVisible()) {
+                if (DebugLayer && scene.debugLayer.isVisible()) {
                     scene.debugLayer._syncPositions();
                 }
             }