Skip to content

Commit

Permalink
Fix exception breaking export when mesh is null or missing
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Aug 23, 2022
1 parent 666cf9a commit 879ed30
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,11 @@ private NodeId ExportNode(Transform nodeTransform)
if (primitives.Length > 0)
{
var uniquePrimitives = GetUniquePrimitivesFromGameObjects(primitives);
node.Mesh = ExportMesh(nodeTransform.name, uniquePrimitives);
RegisterPrimitivesWithNode(node, uniquePrimitives);
if (uniquePrimitives != null)
{
node.Mesh = ExportMesh(nodeTransform.name, uniquePrimitives);
RegisterPrimitivesWithNode(node, uniquePrimitives);
}
}

exportNodeMarker.End();
Expand Down

0 comments on commit 879ed30

Please sign in to comment.