浏览代码

Emitter: fix AnimatedTexture sync in editor

trethaller 4 年之前
父节点
当前提交
920f80fea7
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hrt/prefab/fx/Emitter.hx

+ 2 - 0
hrt/prefab/fx/Emitter.hx

@@ -1253,9 +1253,11 @@ class Emitter extends Object3D {
 		emitterObj.killOnCollision 		= 	getParamVal("killOnCollision");
 		emitterObj.elasticity 			= 	getParamVal("elasticity");
 
+		#if !editor  // Keep startTime at 0 in Editor, since global.time is synchronized to timeline
 		var scene = ctx.local3d.getScene();
 		if(scene != null)
 			emitterObj.startTime = @:privateAccess scene.renderer.ctx.time;
+		#end
 
 		emitterObj.createMeshBatch();
 		refreshChildren(ctx);