Browse Source

Instance creation warning without geometry

sebavan 6 years ago
parent
commit
97eda94f5a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Meshes/instancedMesh.ts

+ 3 - 0
src/Meshes/instancedMesh.ts

@@ -47,6 +47,9 @@ export class InstancedMesh extends AbstractMesh {
         this.setPivotMatrix(source.getPivotMatrix());
         this.setPivotMatrix(source.getPivotMatrix());
 
 
         this.refreshBoundingInfo();
         this.refreshBoundingInfo();
+        if (!this._sourceMesh.subMeshes) {
+            Logger.Warn("Instances should only be created for meshes with Geometry.");
+        }
         this._syncSubMeshes();
         this._syncSubMeshes();
     }
     }