瀏覽代碼

Instance creation warning without geometry

sebavan 6 年之前
父節點
當前提交
97eda94f5a
共有 1 個文件被更改,包括 3 次插入0 次删除
  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.refreshBoundingInfo();
+        if (!this._sourceMesh.subMeshes) {
+            Logger.Warn("Instances should only be created for meshes with Geometry.");
+        }
         this._syncSubMeshes();
     }