diff --git a/Editor/Tools/LightmapTransferTool.cs b/Editor/Tools/LightmapTransferTool.cs index 4e680229..c838784b 100644 --- a/Editor/Tools/LightmapTransferTool.cs +++ b/Editor/Tools/LightmapTransferTool.cs @@ -3907,7 +3907,15 @@ static Dictionary NormalizeExportHierarchy(GameObject root) var mesh = childMf.sharedMesh; if (!mesh.isReadable) continue; - BakeTransformIntoMesh(mesh, t); + // A cloned FBX hierarchy can contain several nodes that instance + // the same Mesh. Baking into sharedMesh directly would apply each + // node's transform cumulatively to that one object. Give every + // transformed node its own copy before mutating the vertex data. + var bakedMesh = UnityEngine.Object.Instantiate(mesh); + bakedMesh.name = mesh.name; + childMf.sharedMesh = bakedMesh; + + BakeTransformIntoMesh(bakedMesh, t); // Reset transform to identity t.localPosition = Vector3.zero;