diff --git a/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs b/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs
new file mode 100644
index 000000000..7d533e5ab
--- /dev/null
+++ b/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs
@@ -0,0 +1,62 @@
+using System.IO;
+using System.Linq;
+using UnityEngine;
+
+
+namespace UniVRM10.VRM10Viewer
+{
+ static class ArgumentChecker
+ {
+ static string[] Supported = {
+ ".gltf",
+ ".glb",
+ ".vrm",
+ ".zip",
+ };
+
+ static string UnityHubPath => System.Environment.GetEnvironmentVariable("ProgramFiles") + "\\Unity\\Hub";
+
+ public static bool IsLoadable(string path)
+ {
+ if (!File.Exists(path))
+ {
+ // not exists
+ return false;
+ }
+
+ if (Application.isEditor)
+ {
+ // skip editor argument
+ // {UnityHub_Resources}\PackageManager\ProjectTemplates\com.unity.template.3d-5.0.4.tgz
+ if (path.StartsWith(UnityHubPath))
+ {
+ return false;
+ }
+ }
+
+ var ext = Path.GetExtension(path).ToLower();
+ if (!Supported.Contains(ext))
+ {
+ // unknown extension
+ return false;
+ }
+
+ return true;
+ }
+
+ public static bool TryGetFirstLoadable(out string cmd)
+ {
+ foreach (var arg in System.Environment.GetCommandLineArgs())
+ {
+ if (ArgumentChecker.IsLoadable(arg))
+ {
+ cmd = arg;
+ return true;
+ }
+ }
+
+ cmd = default;
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs.meta b/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs.meta
new file mode 100644
index 000000000..dd05c1821
--- /dev/null
+++ b/Assets/VRM10_Samples/VRM10Viewer/UI/ArgumentChecker.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 052e1c03459c30244b72f1e02ddbf420
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/VRM10_Samples/VRM10Viewer/UI/MainView.uxml b/Assets/VRM10_Samples/VRM10Viewer/UI/MainView.uxml
index dbc9babe5..bd879d600 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/UI/MainView.uxml
+++ b/Assets/VRM10_Samples/VRM10Viewer/UI/MainView.uxml
@@ -2,6 +2,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Assets/VRM10_Samples/VRM10Viewer/UI/VRM10MainView.cs b/Assets/VRM10_Samples/VRM10Viewer/UI/VRM10MainView.cs
index 25a884a35..cd421a73c 100644
--- a/Assets/VRM10_Samples/VRM10Viewer/UI/VRM10MainView.cs
+++ b/Assets/VRM10_Samples/VRM10Viewer/UI/VRM10MainView.cs
@@ -1,12 +1,17 @@
-using System.Collections;
-using System.Collections.Generic;
+using UniGLTF;
+using UniGLTF.SpringBoneJobs.Blittables;
using UnityEngine;
+using UnityEngine.Rendering;
+using UnityEngine.UIElements;
namespace UniVRM10.VRM10Viewer
{
public class VRM10MainView : MonoBehaviour
{
+ [SerializeField]
+ TextAsset m_motion;
+
[Header("Material")]
[SerializeField]
Material m_pbrOpaqueMaterial = default;
@@ -18,18 +23,225 @@ namespace UniVRM10.VRM10Viewer
Material m_mtoonMaterialAlphaBlend = default;
VRM10ViewerController m_controller;
-
+ Toggle m_useAsync;
+ Toggle m_useSpringboneSingleton;
+ Toggle m_useCustomPbrMaterial;
+ Toggle m_useCustomMToonMaterial;
+ Toggle m_useTPose;
+ Slider m_springboneExternalX;
+ Slider m_springboneExternalY;
+ Slider m_springboneExternalZ;
+ Toggle m_useSpringbonePause;
+ Toggle m_useSpringboneScaling;
void OnEnable()
{
m_controller = new VRM10ViewerController(
(m_mtoonMaterialOpaque != null && m_mtoonMaterialAlphaBlend != null) ? new TinyMToonrMaterialImporter(m_mtoonMaterialOpaque, m_mtoonMaterialAlphaBlend) : null,
(m_pbrOpaqueMaterial != null && m_pbrAlphaBlendMaterial != null) ? new TinyPbrMaterialImporter(m_pbrOpaqueMaterial, m_pbrAlphaBlendMaterial) : null
);
+ // m_controller.OnUpdateMeta += UpdateMeta;
+ m_controller.OnLoaded += OnLoaded;
+
+ // The UXML is already instantiated by the UIDocument component
+ var uiDocument = GetComponent();
+ var root = uiDocument.rootVisualElement;
+
+ var openModelButton = root.Q