-Version 0.82.0 0.82.1 以降を使ってください。
+Version 0.82.0 は 0.82.1 以降を使ってください。
Version 0.82.1~
以下の手順で import します。
@@ -79,6 +79,7 @@
VrmData から RuntimeGltfInstance をロードする。
RuntimeGltfInstance を使う。
+サンプルの Assets\VRM\Samples\SimpleViewer\ViewerUI.cs も参照してください。
1. GltfData を得る
GltfData Load(string path)
{
diff --git a/articles/ja/vrm1/vrm1_runtime_load.html b/articles/ja/vrm1/vrm1_runtime_load.html
index 3621d4824..ad5e9f65f 100644
--- a/articles/ja/vrm1/vrm1_runtime_load.html
+++ b/articles/ja/vrm1/vrm1_runtime_load.html
@@ -5,9 +5,9 @@
- 🚧Runtime ロード
+ RuntimeLoad
-
+
@@ -67,16 +67,47 @@
+RuntimeLoad
+VRM-1.0 は、 VRM-0.x もロードできます。
+その場合、あたらしい meta への変換が発生し互換性の無い部分はすべて 不許可 の値になります。
+このため、変換前のライセンスにアクセスする API を提供します。
+サンプルの Assets\VRM10\Samples\VRM10Viewer\VRM10ViewerUI.cs も参照してください。
+async Task<RuntimeGltfInstance> LoadAsync(string path)
+{
+ GltfData data = new GltfZipOrGlbFileParser(path).Parse();
-VRM-1.0 を使うアプリケーションは、 VRM-0.x の資産もロードしたいはずです。
-VRM-1.0 と VRM-0.X の meta の非互換に Metaの自動的なマイグレーションは禁止する方針 となりました。
-VRM-0.X を VRM-1.0 コンポーネントに対してロードする
-UniVRM-1.0 では、
-VRM-0.X のライセンスを保持したまま、VRM-1.0 のコンポーネントにロードする機能を提供します(予定)。
-アプリケーションは、この方法でロードしたモデルは、VRM-0.X ライセンスとして扱ってください。
-RuntimeLoad 例
-vrm-0.x と vrm-1.0 両方をロードしてライセンスを取得する例。
+ // doMigrate: true で旧バージョンの vrm をロードできます。
+ if (Vrm10Data.TryParseOrMigrate(data, doMigrate: true, out Vrm10Data vrm))
+ {
+ // vrm
+ using (var loader = new Vrm10Importer(vrm,
+ materialGenerator: GetVrmMaterialDescriptorGenerator(m_useUrpMaterial.isOn)))
+ {
+ // migrate しても thumbnail は同じ
+ var thumbnail = await loader.LoadVrmThumbnailAsync();
+
+ if (vrm.OldMeta != null)
+ {
+ // migrated from vrm-0.x. use OldMeta
+ UpdateMeta(vrm.OldMeta, thumbnail);
+ }
+ else
+ {
+ // load vrm-1.0. use newMeta
+ UpdateMeta(vrm.VrmExtension.Meta, thumbnail);
+ }
+
+ // モデルをロード
+ RuntimeGltfInstance instance = await loader.LoadAsync();
+ return instance;
+ }
+ }
+ else{
+ throw new Exception("not vrm");
+ }
+}
+
diff --git a/manifest.json b/manifest.json
index d04914bdf..0a3c23a39 100644
--- a/manifest.json
+++ b/manifest.json
@@ -18,18 +18,6 @@
"is_incremental": false,
"version": ""
},
- {
- "type": "ManagedReference",
- "source_relative_path": "api/UniGLTF.AmbiguousGltfFileParser.yml",
- "output": {
- ".html": {
- "relative_path": "api/UniGLTF.AmbiguousGltfFileParser.html",
- "hash": "z1qZ0rW5Zwy1d87n5RlV29r26mxpXZpCbQk5suyWXE4="
- }
- },
- "is_incremental": false,
- "version": ""
- },
{
"type": "ManagedReference",
"source_relative_path": "api/UniGLTF.AnimationExporter.InputOutputValues.yml",
@@ -2760,7 +2748,7 @@
"output": {
".html": {
"relative_path": "api/UniGLTF.html",
- "hash": "4BMHbNCtrKgbjEfHx8E51VX9b8oKQruF2OZh6ehhkas="
+ "hash": "uGlgaxB8ni9tLyVbusx7PqJPiSlLapkhRflE9fuWQ6I="
}
},
"is_incremental": false,
@@ -4464,7 +4452,19 @@
"output": {
".html": {
"relative_path": "api/toc.html",
- "hash": "6O9XFCPWapd5iziq00hx1qGBalqJLQLTKV75FgJRVMY="
+ "hash": "v1BtuWwB/f9nV+eJxUNtL/JakHeVsX81f74Mpoi0ocA="
+ }
+ },
+ "is_incremental": false,
+ "version": ""
+ },
+ {
+ "type": "Conceptual",
+ "source_relative_path": "articles/en/gltf/0_36_update.md",
+ "output": {
+ ".html": {
+ "relative_path": "articles/en/gltf/0_36_update.html",
+ "hash": "qyUm2ddjOYNouvW2fGuQdpJQPVhxNItrDztXFXxS2js="
}
},
"is_incremental": false,
@@ -4476,7 +4476,7 @@
"output": {
".html": {
"relative_path": "articles/en/gltf/0_82_glb_import.html",
- "hash": "sePaFU7bPMVRBXhGAxP6mRHoHA2pAlahd/YdY2RnFgM="
+ "hash": "heAC1zWdIihS0cXtVL/ESqdJJO8hpbZFIMzuQEG+vJk="
}
},
"is_incremental": false,
@@ -4500,7 +4500,7 @@
"output": {
".html": {
"relative_path": "articles/en/history.html",
- "hash": "SvqIt/oocNob3emRpULHT5gAMiyD3eUQPfs9DP3FtZ8="
+ "hash": "w2e0Sz1MYi+9aMGmBnLunoljCOzXGX9PjVyEgBdiJD4="
}
},
"is_incremental": false,
@@ -4536,7 +4536,7 @@
"output": {
".html": {
"relative_path": "articles/en/toc.html",
- "hash": "1cErx3ondkrN56hPAu+BZvnJEd3b8Fa+JlKv7u31BPY="
+ "hash": "0xAo3eJaAstFH1Iz+d8jAM0gyJczjnYoEjCtsT7Q4Os="
}
},
"is_incremental": false,
@@ -4560,7 +4560,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm0/0_58_blendshape.html",
- "hash": "xIasr5p9f1Kg7Tq57/iuqgOT58IA3KB1+WttcpoXmHg="
+ "hash": "VHQ14lZz1wGlY5atD4YlZ2wp1SuscV1FFE1R1lXqj14="
}
},
"is_incremental": false,
@@ -4608,7 +4608,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm0/0_82_runtime_import.html",
- "hash": "ee7MtwC62KPXwOTOnI9Su04fMxwiqZzCflTrcCZpBuM="
+ "hash": "H1v5NSOv4dzNelyXXS3M0q4L2WH2C9G/ZgReeGU3aH0="
}
},
"is_incremental": false,
@@ -4680,7 +4680,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm1/vrm1_runtime_load.html",
- "hash": "5HJQmEX1yWy1vZIQwKiOWE1uNvJatw51ORpss7UphKw="
+ "hash": "fjlzlJif09I9fVRQuqrboU634xUfEv119MpqMAxOHg8="
}
},
"is_incremental": false,
@@ -4701,13 +4701,25 @@
"is_incremental": false,
"version": ""
},
+ {
+ "type": "Conceptual",
+ "source_relative_path": "articles/ja/gltf/0_36_update.md",
+ "output": {
+ ".html": {
+ "relative_path": "articles/ja/gltf/0_36_update.html",
+ "hash": "1Clgv0oiy1wbunxm5rTaxMClofzZ5AcsEA+rXx4EIJ4="
+ }
+ },
+ "is_incremental": false,
+ "version": ""
+ },
{
"type": "Conceptual",
"source_relative_path": "articles/ja/gltf/0_82_glb_import.md",
"output": {
".html": {
"relative_path": "articles/ja/gltf/0_82_glb_import.html",
- "hash": "n5U2x3FheIJItVm+4eMQVnPsT8KzVhFeT/fJkmmjYps="
+ "hash": "CrRq0blmzEkWj0ssm+P1pfAL/IaLhuzvQ//lrX8w76k="
}
},
"is_incremental": false,
@@ -4731,7 +4743,7 @@
"output": {
".html": {
"relative_path": "articles/ja/history.html",
- "hash": "0EovI4tLnDmUXYHVovxanrJrubepxT5D5oZS6rUCJws="
+ "hash": "wUFDP/mJ8eWofsSom+5kod7E6J8fG0qeMbjA8md8KRc="
}
},
"is_incremental": false,
@@ -4767,7 +4779,7 @@
"output": {
".html": {
"relative_path": "articles/ja/toc.html",
- "hash": "RCUOWZpFItkHAmN9xlkHAp8nNtpApBiIzyEHqkCQ0D8="
+ "hash": "lpMPaG+LLg4loS9KCp9yllBcKY/sM/ySq4Iq4Z9VNRw="
}
},
"is_incremental": false,
@@ -4791,7 +4803,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm0/0_58_blendshape.html",
- "hash": "Z7K5rQ1drsMhkrCALhac1BEml4NyoSrfkjJIfgZZVxk="
+ "hash": "jFXpvzG+XKWudsB1P0lcfVQN571lfmEq3ou60Q0d4Qo="
}
},
"is_incremental": false,
@@ -4839,7 +4851,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm0/0_82_runtime_import.html",
- "hash": "mkQnVZnFrSBTi1dCMHAOfKtVXIm7EBvkXaGtjvr8TtM="
+ "hash": "09y+kuhgsFhiaGH46SsV+vct0N9DyuSyUy6i0VFw+cA="
}
},
"is_incremental": false,
@@ -4911,7 +4923,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm1/vrm1_runtime_load.html",
- "hash": "JQ0gdAHhk0tFT6KP7vdoBVRDji9wYVtlN+kMvLCFzPc="
+ "hash": "0wPDelUL0uo1W8X5PYenTc/5QWnyShZw4oxRXTPpOWk="
}
},
"is_incremental": false,
@@ -4974,13 +4986,13 @@
"ConceptualDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
- "total_file_count": 38,
+ "total_file_count": 40,
"skipped_file_count": 0
},
"ManagedReferenceDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
- "total_file_count": 369,
+ "total_file_count": 368,
"skipped_file_count": 0
},
"TocDocumentProcessor": {
diff --git a/xrefmap.yml b/xrefmap.yml
index 9048a4695..7a616fe63 100644
--- a/xrefmap.yml
+++ b/xrefmap.yml
@@ -7,38 +7,6 @@ references:
commentId: N:UniGLTF
fullName: UniGLTF
nameWithType: UniGLTF
-- uid: UniGLTF.AmbiguousGltfFileParser
- name: AmbiguousGltfFileParser
- href: api/UniGLTF.AmbiguousGltfFileParser.html
- commentId: T:UniGLTF.AmbiguousGltfFileParser
- fullName: UniGLTF.AmbiguousGltfFileParser
- nameWithType: AmbiguousGltfFileParser
-- uid: UniGLTF.AmbiguousGltfFileParser.#ctor(System.String)
- name: AmbiguousGltfFileParser(String)
- href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser__ctor_System_String_
- commentId: M:UniGLTF.AmbiguousGltfFileParser.#ctor(System.String)
- fullName: UniGLTF.AmbiguousGltfFileParser.AmbiguousGltfFileParser(System.String)
- nameWithType: AmbiguousGltfFileParser.AmbiguousGltfFileParser(String)
-- uid: UniGLTF.AmbiguousGltfFileParser.#ctor*
- name: AmbiguousGltfFileParser
- href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser__ctor_
- commentId: Overload:UniGLTF.AmbiguousGltfFileParser.#ctor
- isSpec: "True"
- fullName: UniGLTF.AmbiguousGltfFileParser.AmbiguousGltfFileParser
- nameWithType: AmbiguousGltfFileParser.AmbiguousGltfFileParser
-- uid: UniGLTF.AmbiguousGltfFileParser.Parse
- name: Parse()
- href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser_Parse
- commentId: M:UniGLTF.AmbiguousGltfFileParser.Parse
- fullName: UniGLTF.AmbiguousGltfFileParser.Parse()
- nameWithType: AmbiguousGltfFileParser.Parse()
-- uid: UniGLTF.AmbiguousGltfFileParser.Parse*
- name: Parse
- href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser_Parse_
- commentId: Overload:UniGLTF.AmbiguousGltfFileParser.Parse
- isSpec: "True"
- fullName: UniGLTF.AmbiguousGltfFileParser.Parse
- nameWithType: AmbiguousGltfFileParser.Parse
- uid: UniGLTF.AnimationExporter
name: AnimationExporter
href: api/UniGLTF.AnimationExporter.html