From 6dc449a61d3f5d1c154d8fd3ec3e33d3ec9d43a4 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 25 Jan 2022 20:02:15 +0900 Subject: [PATCH] use VrmUtility --- .../FirstPersonSample/VRMRuntimeLoader.cs | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs b/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs index 57dcb479e..ed4c36a07 100644 --- a/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs +++ b/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs @@ -85,27 +85,8 @@ namespace VRM.FirstPersonSample // GLB形式でJSONを取得しParseします // VRM extension を parse します - var data = new GlbFileParser(path).Parse(); - var vrm = new VRMData(data); - using (var context = new VRMImporterContext(vrm)) - { - // metaを取得(todo: thumbnailテクスチャのロード) - var meta = await context.ReadMetaAsync(); - Debug.LogFormat("meta: title:{0}", meta.Title); - - // ParseしたJSONをシーンオブジェクトに変換していく - var loaded = default(RuntimeGltfInstance); - if (m_loadAsync) - { - loaded = await context.LoadAsync(); - } - else - { - loaded = context.Load(); - } - - OnLoaded(loaded); - } + var loaded = await VrmUtility.LoadAsync(path); + OnLoaded(loaded); } ///