mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 22:50:08 -05:00
Merge pull request #2193 from ousttrue/fix/lookat_test
[test] Fix/lookat test
This commit is contained in:
commit
017bf9e637
|
|
@ -28,7 +28,8 @@ namespace VRM
|
|||
{
|
||||
foreach (var x in destroy)
|
||||
{
|
||||
Debug.LogFormat("destroy: {0}", x.name);
|
||||
// x.name がエラーを引き起こす場合がある
|
||||
// Debug.LogFormat("destroy: {0}", x.name);
|
||||
GameObject.DestroyImmediate(x);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +55,7 @@ namespace VRM
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (removeUnknown && clip.Preset == BlendShapePreset.Unknown)
|
||||
{
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ namespace VRM
|
|||
foreach (var boneGroup in secondaryAnimation.boneGroups)
|
||||
{
|
||||
var vrmBoneGroup = secondary.gameObject.AddComponent<VRMSpringBone>();
|
||||
if (tryGetNode(boneGroup.center, out var node))
|
||||
if (boneGroup.center != -1 && tryGetNode(boneGroup.center, out var node))
|
||||
{
|
||||
vrmBoneGroup.m_center = node;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using UniGLTF;
|
||||
|
|
@ -32,11 +33,10 @@ namespace VRM
|
|||
var fp = go.GetComponent<VRMFirstPerson>();
|
||||
GameObject.DestroyImmediate(go.GetComponent<VRMLookAtBoneApplyer>());
|
||||
var lookAt = go.AddComponent<VRMLookAtBlendShapeApplyer>();
|
||||
bytes = VRMEditorExporter.Export(go, null, new VRMExportSettings
|
||||
{
|
||||
PoseFreeze = true,
|
||||
});
|
||||
}
|
||||
var settings = (VRMExportSettings)ScriptableObject.CreateInstance<VRMExportSettings>();
|
||||
settings.PoseFreeze = true;
|
||||
bytes = VRMEditorExporter.Export(go, null, settings);
|
||||
}
|
||||
|
||||
using (var data2 = new GlbLowLevelParser(AliciaPath, bytes).Parse())
|
||||
using (var loader2 = new VRMImporterContext(new VRMData(data2)))
|
||||
|
|
@ -61,10 +61,9 @@ namespace VRM
|
|||
var fp = go.GetComponent<VRMFirstPerson>();
|
||||
var lookAt = go.GetComponent<VRMLookAtBoneApplyer>();
|
||||
horizontalInner = lookAt.HorizontalInner;
|
||||
bytes = VRMEditorExporter.Export(go, null, new VRMExportSettings
|
||||
{
|
||||
PoseFreeze = true,
|
||||
});
|
||||
var settings = ScriptableObject.CreateInstance<VRMExportSettings>();
|
||||
settings.PoseFreeze = true;
|
||||
bytes = VRMEditorExporter.Export(go, null, settings);
|
||||
}
|
||||
|
||||
using (var data2 = new GlbLowLevelParser(AliciaPath, bytes).Parse())
|
||||
|
|
@ -95,10 +94,9 @@ namespace VRM
|
|||
var fp = go.GetComponent<VRMFirstPerson>();
|
||||
var lookAt = go.GetComponent<VRMLookAtBoneApplyer>();
|
||||
horizontalInner = lookAt.HorizontalInner;
|
||||
bytes = VRMEditorExporter.Export(go, null, new VRMExportSettings
|
||||
{
|
||||
PoseFreeze = false,
|
||||
});
|
||||
var settings = (VRMExportSettings)ScriptableObject.CreateInstance<VRMExportSettings>();
|
||||
settings.PoseFreeze = false;
|
||||
bytes = VRMEditorExporter.Export(go, null, settings);
|
||||
}
|
||||
|
||||
using (var data2 = new GlbLowLevelParser(AliciaPath, bytes).Parse())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user