浏览代码

Model: keep cdb props when changing model to prefab

lviguier 9 月之前
父节点
当前提交
f933ed9f1b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hrt/prefab/Model.hx

+ 1 - 0
hrt/prefab/Model.hx

@@ -124,6 +124,7 @@ class Model extends Object3D {
 			var toAdd = undo ? new hrt.prefab.Model(null, toRemove.shared) : new hrt.prefab.Reference(null, toRemove.shared);
 			toAdd.source = toAddPath;
 			toAdd.name = toRemove.name;
+			toAdd.props = toRemove.props;
 			toAdd.setTransform(toRemove.getTransform());
 			parent.children.insert(idx, toAdd);
 			@:bypassAccessor toAdd.parent = parent;