Skip to content

Commit 6259482

Browse files
committed
Fixed pull request changes
1 parent 593c66b commit 6259482

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,9 @@ protected bool ExportInstance (GameObject unityGo, FbxNode fbxNode, FbxScene fbx
12601260
return true;
12611261
}
12621262
}
1263-
else
1263+
1264+
1265+
if (SharedMeshes.TryGetValue (unityPrefabParent.name, out fbxMesh))
12641266
{
12651267
// We don't export the mesh because we already have it from the parent, but we still need to assign the material
12661268
var renderer = unityGo.GetComponent<Renderer>();
@@ -1276,14 +1278,26 @@ protected bool ExportInstance (GameObject unityGo, FbxNode fbxNode, FbxScene fbx
12761278
}
12771279
}
12781280
}
1281+
1282+
// set the fbxNode containing the mesh
1283+
fbxNode.SetNodeAttribute (fbxMesh);
1284+
fbxNode.SetShadingMode (FbxNode.EShadingMode.eWireFrame);
1285+
}
1286+
else
1287+
{
1288+
if (ExportMesh (unityGo, fbxNode) && fbxNode.GetMesh() != null) {
1289+
SharedMeshes [unityPrefabParent.name] = fbxNode.GetMesh ();
1290+
return true;
1291+
}
1292+
else
1293+
{
1294+
return false;
1295+
}
12791296
}
1280-
12811297

12821298
if (fbxMesh == null) return false;
12831299

1284-
// set the fbxNode containing the mesh
1285-
fbxNode.SetNodeAttribute (fbxMesh);
1286-
fbxNode.SetShadingMode (FbxNode.EShadingMode.eWireFrame);
1300+
12871301

12881302
return true;
12891303
}

0 commit comments

Comments
 (0)