From 4688ba7c1b1d3c3dcc65646f06aec4b196175d65 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 7 Jun 2022 16:49:03 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=90=8D=E3=80=82=E3=82=88?= =?UTF-8?q?=E3=81=8F=E3=82=8F=E3=81=8B=E3=82=89=E3=81=AA=E3=81=84=E3=82=B3?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs index 58f8f7035..ee291fd7c 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs @@ -631,7 +631,7 @@ namespace UniGLTF public async Task BuildMeshAsync( IAwaitCaller awaitCaller, - Func ctx) + Func materialFromIndex) { Profiler.BeginSample("MeshImporter.BuildMesh"); AddDefaultMaterial(); @@ -661,11 +661,10 @@ namespace UniGLTF mesh.RecalculateTangents(); await awaitCaller.NextFrame(); - // 先にすべてのマテリアルを作成済みなのでテクスチャーは生成済み。Resultを使ってよい var result = new MeshWithMaterials { Mesh = mesh, - Materials = MaterialIndices.Select(ctx).ToArray() + Materials = MaterialIndices.Select(materialFromIndex).ToArray() }; await awaitCaller.NextFrame(); @@ -685,6 +684,5 @@ namespace UniGLTF return result; } - } -} \ No newline at end of file +}