mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-07 11:28:35 -05:00
Update UniGLTF
This commit is contained in:
@@ -456,9 +456,10 @@ namespace VRM
|
||||
#region LoadVrmAsync
|
||||
static IEnumerator LoadTextures(VRMImporterContext context)
|
||||
{
|
||||
foreach (var gltfTexture in context.GLTF.textures)
|
||||
for(int i=0; i<context.GLTF.textures.Count; ++i)
|
||||
{
|
||||
var x = UniGLTF.gltfImporter.ImportTexture(context.GLTF, gltfTexture.source);
|
||||
var x = new TextureItem(context.GLTF, i);
|
||||
x.Process();
|
||||
context.Textures.Add(x);
|
||||
yield return null;
|
||||
}
|
||||
@@ -573,7 +574,12 @@ namespace VRM
|
||||
{
|
||||
var index = i;
|
||||
parent.AddTask(Scheduler.MainThread,
|
||||
() => gltfImporter.ImportTexture(ctx.GLTF, index))
|
||||
() =>
|
||||
{
|
||||
var texture = new TextureItem(ctx.GLTF, index);
|
||||
texture.Process();
|
||||
return texture;
|
||||
})
|
||||
.ContinueWith(Scheduler.ThreadPool, x => ctx.Textures.Add(x));
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user