瀏覽代碼

Support references in emitters

trethaller 7 年之前
父節點
當前提交
b374299960
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/prefab/fx/Emitter.hx

+ 1 - 1
hide/prefab/fx/Emitter.hx

@@ -480,7 +480,7 @@ class Emitter extends Object3D {
 		var emitterObj = Std.instance(ctx.local3d, EmitterObject);
 
 		var randIdx = 0;
-		var template = Std.instance(children[0], Object3D);
+		var template = children[0] != null ? children[0].to(Object3D) : null;
 
 		function makeParam(scope: Prefab, name: String): Value {
 			var getCurve = hide.prefab.Curve.getCurve.bind(scope);