From f19c1b46989ac5d24b888f2978c2701e9bd639a8 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 16 Feb 2021 16:16:56 +0900 Subject: [PATCH] =?UTF-8?q?AsIEnumerator=20=E3=81=A7=E5=90=8C=E6=9C=9F?= =?UTF-8?q?=E7=9A=84=E3=81=AB=20Task=20=E3=82=92=E6=B6=88=E5=8C=96?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=AE=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=A6?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=80=82=E5=BF=9C=E6=80=A5=E5=87=A6=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UniGLTF/IO/TextureLoader/GltfTextureLoader.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/GltfTextureLoader.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/GltfTextureLoader.cs index 0ba1a2583..5f7dd8048 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/GltfTextureLoader.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/GltfTextureLoader.cs @@ -28,12 +28,9 @@ namespace UniGLTF { string m_textureName = default; - var imageBytes = await Task.Run(() => - { - var imageIndex = gltf.GetImageIndexFromTextureIndex(index); - var segments = gltf.GetImageBytes(storage, imageIndex, out m_textureName); - return ToArray(segments); - }); + var imageIndex = gltf.GetImageIndexFromTextureIndex(index); + var segments = gltf.GetImageBytes(storage, imageIndex, out m_textureName); + var imageBytes = ToArray(segments); // // texture from image(png etc) bytes