Browse Source

[ref] Fix resolveRef caching,

- Resolve refs being cloned twice on make in editor
Clément Espeute 7 tháng trước cách đây
mục cha
commit
3ade0352fb
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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 (_) {