mv VRM10.Samples to VRM10/Samples

* StreamingAssets 移動
* BVH load 調整
This commit is contained in:
ousttrue
2021-08-18 18:19:14 +09:00
parent cb5a30d683
commit 54d2e967e5
32 changed files with 60 additions and 88 deletions

View File

@@ -4671,6 +4671,7 @@ MonoBehaviour:
m_target: {fileID: 802105000}
Root: {fileID: 124675793}
m_reset: {fileID: 1923377808}
m_motion: {fileID: 4900000, guid: 7d2617171adc40b41ac50228f101e178, type: 3}
m_texts:
m_textModelTitle: {fileID: 1111491925}
m_textModelVersion: {fileID: 1045380263}

View File

@@ -41,6 +41,9 @@ namespace VRM.SimpleViewer
[SerializeField]
Button m_reset = default;
[SerializeField]
TextAsset m_motion;
[Serializable]
class TextFields
{
@@ -219,7 +222,10 @@ namespace VRM.SimpleViewer
m_reset.onClick.AddListener(OnResetClicked);
// load initial bvh
LoadMotion(Application.streamingAssetsPath + "/VRM.Samples/Motions/test.txt");
if (m_motion != null)
{
LoadMotion(m_motion.text);
}
string[] cmds = System.Environment.GetCommandLineArgs();
if (cmds.Length > 1)
@@ -230,10 +236,10 @@ namespace VRM.SimpleViewer
m_texts.Start();
}
private void LoadMotion(string path)
private void LoadMotion(string source)
{
var context = new UniHumanoid.BvhImporterContext();
context.Parse(path);
context.Parse("tmp.bvh", source);
context.Load();
SetMotion(context.Root.GetComponent<HumanPoseTransfer>());
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7d2617171adc40b41ac50228f101e178
timeCreated: 1546851178
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant: