mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-28 22:03:28 -05:00
mv VRM10.Samples to VRM10/Samples
* StreamingAssets 移動 * BVH load 調整
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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>());
|
||||
}
|
||||
|
||||
4136
Assets/VRM/Samples/SimpleViewer/test_motion.txt
Normal file
4136
Assets/VRM/Samples/SimpleViewer/test_motion.txt
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/VRM/Samples/SimpleViewer/test_motion.txt.meta
Normal file
8
Assets/VRM/Samples/SimpleViewer/test_motion.txt.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d2617171adc40b41ac50228f101e178
|
||||
timeCreated: 1546851178
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user