From 9ad556abcc0a546a8baff6c1dfcb8e4351dc327e Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 7 Jun 2022 16:09:11 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=90=E3=83=BC=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=82=8F=E3=81=AA=E3=81=84=20MeshImporter=20=E3=82=92?= =?UTF-8?q?=20static=20class=20=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs | 3 +-- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshImporter.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs index 003c8063e..cb281bf96 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs @@ -167,7 +167,6 @@ namespace UniGLTF { var inverter = InvertAxis.Create(); - var meshImporter = new MeshImporter(); if (GLTF.meshes.Count > 0) { for (var i = 0; i < GLTF.meshes.Count; ++i) @@ -175,7 +174,7 @@ namespace UniGLTF var index = i; using (MeasureTime("ReadMesh")) { - var meshContext = await awaitCaller.Run(() => meshImporter.ReadMesh(Data, index, inverter)); + var meshContext = await awaitCaller.Run(() => MeshImporter.ReadMesh(Data, index, inverter)); var meshWithMaterials = await BuildMeshAsync(awaitCaller, MeasureTime, meshContext, index); Meshes.Add(meshWithMaterials); } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshImporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshImporter.cs index 5fcb06ca1..aa726b807 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshImporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshImporter.cs @@ -7,7 +7,7 @@ using VRMShaders; namespace UniGLTF { - public class MeshImporter + public static class MeshImporter { private const float FrameWeight = 100.0f; @@ -29,7 +29,7 @@ namespace UniGLTF return sharedAttributes; } - internal MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter) + internal static MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter) { Profiler.BeginSample("ReadMesh"); var gltfMesh = data.GLTF.meshes[meshIndex];