Procházet zdrojové kódy

Merge pull request #1282 from wyklion/master

If not use extra(no DebugLayer) it will be error.
David Catuhe před 9 roky
rodič
revize
eb434d93be
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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++) {
             for (var index = 0; index < this.scenes.length; index++) {
                 var scene = this.scenes[index];
                 var scene = this.scenes[index];
-                if (scene.debugLayer.isVisible()) {
+                if (DebugLayer && scene.debugLayer.isVisible()) {
                     scene.debugLayer._syncPositions();
                     scene.debugLayer._syncPositions();
                 }
                 }
             }
             }