Skip to content

Commit

Permalink
Merge pull request #1117 from ichi-23/ichi/skip_invalid_mesh_export
Browse files Browse the repository at this point in the history
Skip mesh export when MeshExportInfo.CanExport is false
  • Loading branch information
ousttrue authored Jul 28, 2021
2 parents 3579893 + c438331 commit 7067e52
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ public virtual void Export(GltfExportSettings meshExportSettings, ITextureSerial
MeshBlendShapeIndexMap = new Dictionary<Mesh, Dictionary<int, int>>();
foreach (var unityMesh in uniqueUnityMeshes)
{
if (!unityMesh.CanExport)
{
continue;
}

var (gltfMesh, blendShapeIndexMap) = meshExportSettings.DivideVertexBuffer
? MeshExporter_DividedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, m_settings.InverseAxis.Create(), meshExportSettings)
: MeshExporter_SharedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, m_settings.InverseAxis.Create(), meshExportSettings)
Expand Down

0 comments on commit 7067e52

Please sign in to comment.