mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 12:29:23 -05:00
Modified storage interface
This commit is contained in:
@@ -59,7 +59,7 @@ public class VRMTest
|
||||
exporter.Export();
|
||||
|
||||
// import
|
||||
context.ParseJson<glTF_VRM>(gltf.ToJson(), new ArraySegment<byte>());
|
||||
context.ParseJson<glTF_VRM>(gltf.ToJson(), new SimpleStorage());
|
||||
Debug.LogFormat("{0}", context.Json);
|
||||
gltfImporter.Import<glTF>(context);
|
||||
|
||||
|
||||
@@ -405,12 +405,12 @@ namespace VRM
|
||||
#endregion
|
||||
|
||||
#region LoadVrmAsync
|
||||
static IEnumerator LoadTextures(VRMImporterContext context)
|
||||
static IEnumerator LoadTextures(VRMImporterContext context, IStorage storage)
|
||||
{
|
||||
for(int i=0; i<context.GLTF.textures.Count; ++i)
|
||||
{
|
||||
var x = new TextureItem(context.GLTF, i);
|
||||
x.Process();
|
||||
x.Process(storage);
|
||||
context.Textures.Add(x);
|
||||
yield return null;
|
||||
}
|
||||
@@ -558,7 +558,7 @@ namespace VRM
|
||||
() =>
|
||||
{
|
||||
var texture = new TextureItem(ctx.GLTF, index);
|
||||
texture.Process();
|
||||
texture.Process(ctx.Storage);
|
||||
return texture;
|
||||
})
|
||||
.ContinueWith(Scheduler.ThreadPool, x => ctx.Textures.Add(x));
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace VRM
|
||||
if(gltfMeta.texture >= 0 && gltfMeta.texture < VRM.textures.Count)
|
||||
{
|
||||
var t = new TextureItem(VRM, gltfMeta.texture);
|
||||
t.Process();
|
||||
t.Process(Storage);
|
||||
meta.Thumbnail=t.Texture;
|
||||
}
|
||||
}
|
||||
|
||||
2
UniGLTF
2
UniGLTF
Submodule UniGLTF updated: fb17653c83...673a003669
Reference in New Issue
Block a user