From 75afd54cfbf83c33323c8a46127f0fb7a07dd1f1 Mon Sep 17 00:00:00 2001 From: notargs Date: Fri, 8 Oct 2021 13:50:34 +0900 Subject: [PATCH] Ignore meshFilter if it hided or hasn't vertex --- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportInfo.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportInfo.cs index 0a52c8c29d..154ed16f40 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportInfo.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportInfo.cs @@ -201,7 +201,7 @@ public MeshExportInfo(Renderer renderer, GltfExportSettings settings) else if (renderer is MeshRenderer mr) { var filter = mr.GetComponent(); - if (filter != null) + if (filter.hideFlags == HideFlags.None && Mesh.vertexCount > 0 && filter != null) { Mesh = filter.sharedMesh; }