maintain compatibility

This commit is contained in:
Masataka SUMI
2024-05-21 12:03:17 +09:00
parent 7629540348
commit 3ec05a2346

View File

@@ -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,