fix Dispose

This commit is contained in:
ousttrue
2021-03-08 19:47:52 +09:00
parent 538f6fa919
commit 3a7fc7735e
15 changed files with 119 additions and 2112 deletions

View File

@@ -50,16 +50,18 @@ namespace VRM.Samples
var parser = new GltfParser();
parser.ParseGlb(bytes);
var context = new VRMImporterContext(parser);
using (var context = new VRMImporterContext(parser))
{
// metaを取得(todo: thumbnailテクスチャのロード)
var meta = await context.ReadMetaAsync();
Debug.LogFormat("meta: title:{0}", meta.Title);
// metaを取得(todo: thumbnailテクスチャのロード)
var meta = await context.ReadMetaAsync();
Debug.LogFormat("meta: title:{0}", meta.Title);
// ParseしたJSONをシーンオブジェクトに変換していく
await context.LoadAsync();
// ParseしたJSONをシーンオブジェクトに変換していく
await context.LoadAsync();
OnLoaded(context);
OnLoaded(context);
}
}
void OnLoaded(VRMImporterContext context)