From 3ec05a23465f293b08fba3fe8132b593aebe386e Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Tue, 21 May 2024 12:03:17 +0900 Subject: [PATCH] maintain compatibility --- Assets/VRM10/Runtime/IO/Vrm10.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Assets/VRM10/Runtime/IO/Vrm10.cs b/Assets/VRM10/Runtime/IO/Vrm10.cs index fc636e5c5..27be68bf4 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10.cs @@ -52,11 +52,7 @@ namespace UniVRM10 ? new RuntimeOnlyAwaitCaller() : new ImmediateCaller(); - using var gltfData = await awaitCaller.Run(() => - { - var bytes = File.ReadAllBytes(path); - return new GlbLowLevelParser(path, bytes).Parse(); - }); + using var gltfData = new GlbLowLevelParser(path, await File.ReadAllBytesAsync(path, ct)).Parse(); return await LoadAsync( gltfData, canLoadVrm0X, @@ -100,7 +96,7 @@ namespace UniVRM10 ? new RuntimeOnlyAwaitCaller() : new ImmediateCaller(); - using var gltfData = await awaitCaller.Run(() => new GlbLowLevelParser(string.Empty, bytes).Parse()); + using var gltfData = new GlbLowLevelParser(string.Empty, bytes).Parse(); return await LoadAsync( gltfData, canLoadVrm0X,