浏览代码

Better place for begin in Batcher.hx

clementlandrin 2 月之前
父节点
当前提交
3e8108b22a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hrt/prefab/l3d/modellibrary/Batcher.hx

+ 1 - 1
hrt/prefab/l3d/modellibrary/Batcher.hx

@@ -49,6 +49,7 @@ class Batcher extends h3d.scene.Object {
 			var material = meshEmitter.materials[materialIndex];
 			var pbrProps = (material.props:PbrProps);
 			batch = createMeshBatch(this, pbrProps, material);
+			batch.begin(emitCountTip);
 			batches[bakedMaterial.materialConfig] = batch;
 		}
 		return batch;
@@ -85,7 +86,6 @@ class Batcher extends h3d.scene.Object {
 		}
 
 		batch.primitiveSubParts = [new h3d.scene.MeshBatch.MeshBatchPart()];
-		batch.begin(emitCountTip);
 	}
 
 	override function onRemove() {