Browse Source

Revert "[ref] Fix reference setting original prefab pos and name on instancing"

This reverts commit 35c31d36a5f34d54c877d98f5cef0464531ea769.
Clément Espeute 6 tháng trước cách đây
mục cha
commit
a4877a6bbb
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      hrt/prefab/Reference.hx

+ 4 - 1
hrt/prefab/Reference.hx

@@ -104,9 +104,12 @@ class Reference extends Object3D {
 		refInstance = p;
 
 		if (refInstance.to(Object3D) != null) {
+			var obj3d = refInstance.to(Object3D);
+			obj3d.loadTransform(this); // apply this transform to the reference prefab
+			obj3d.name = name;
+			obj3d.visible = visible;
 			refInstance.make();
 			local3d = Object3D.getLocal3d(refInstance);
-			updateInstance();
 		}
 		else {
 			refInstance.make();