From c438331162bdff8b11efe32aa71eb3794da2e744 Mon Sep 17 00:00:00 2001 From: ichi23 Date: Tue, 27 Jul 2021 16:11:09 +0900 Subject: [PATCH] skip mesh export if CanExport is false --- Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs index 0a9f650be..916f25cd8 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs @@ -247,6 +247,11 @@ namespace UniGLTF MeshBlendShapeIndexMap = new Dictionary>(); 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)