mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-10-26 04:08:46 -05:00
GltfParserの分離と、ImporterContextのインターフェース整理
使い方 * var parser = new GltfParser(); * parser.ParsePath(filePath); // ParseJson, ParseGlb 等パース系の関数 * context = new ImporterContext(parser); // parse から context を作る * context.Load(); // もしくは LoadAsync で、Unity化する
This commit is contained in:
@@ -46,11 +46,11 @@ namespace VRM.Samples
|
||||
var bytes = File.ReadAllBytes(path);
|
||||
// なんらかの方法でByte列を得た
|
||||
|
||||
var context = new VRMImporterContext();
|
||||
|
||||
// GLB形式でJSONを取得しParseします
|
||||
context.ParseGlb(bytes);
|
||||
var parser = new GltfParser();
|
||||
parser.ParseGlb(bytes);
|
||||
|
||||
var context = new VRMImporterContext(parser);
|
||||
|
||||
// metaを取得(todo: thumbnailテクスチャのロード)
|
||||
var meta = await context.ReadMetaAsync();
|
||||
|
||||
Reference in New Issue
Block a user