浏览代码

[ref] Fix resolveRef caching,

- Resolve refs being cloned twice on make in editor
Clément Espeute 7 月之前
父节点
当前提交
3ade0352fb
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hrt/prefab/Reference.hx

+ 1 - 0
hrt/prefab/Reference.hx

@@ -52,6 +52,7 @@ class Reference extends Object3D {
 		#end
 			var refInstance = hxd.res.Loader.currentInstance.load(source).to(hrt.prefab.Resource).load().clone();
 			refInstance.shared.parentPrefab = this;
+			this.refInstance = refInstance;
 			return refInstance;
 		#if editor
 		} catch (_) {