Skip to content

Commit 6877a62

Browse files
committed
keep prefab root transform same as FBX
- don't want it to change after changing the parent transform, as this will be set on the instance root
1 parent 39b3494 commit 6877a62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.unity.formats.fbx/Editor/ConvertToNestedPrefab.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ public static GameObject Convert(
412412
// replace hierarchy in the scene
413413
if (!isPrefabAsset && toConvert != null)
414414
{
415-
fbxInstance.transform.parent = toConvert.transform.parent;
415+
// don't worry about keeping the world position in the prefab, as we will fix the transform on the instance root
416+
fbxInstance.transform.SetParent(toConvert.transform.parent, worldPositionStays: false);
416417
fbxInstance.transform.SetSiblingIndex(toConvert.transform.GetSiblingIndex());
417418
}
418419

0 commit comments

Comments
 (0)