diff --git a/Assets/VRM/UniVRM/Editor/BlendShape/VRMBlendShapeProxyValidator.cs b/Assets/VRM/UniVRM/Editor/BlendShape/VRMBlendShapeProxyValidator.cs index 37eace657..be97ab003 100644 --- a/Assets/VRM/UniVRM/Editor/BlendShape/VRMBlendShapeProxyValidator.cs +++ b/Assets/VRM/UniVRM/Editor/BlendShape/VRMBlendShapeProxyValidator.cs @@ -26,7 +26,7 @@ namespace VRM var key = c.Key; if (used.Contains(key)) { - yield return Validation.Error($"duplicated BlendShapeKey: {c}"); + yield return Validation.Error($"duplicated BlendShapeKey: {key}"); } else { @@ -55,7 +55,7 @@ namespace VRM var target = p.transform.Find(v.RelativePath); if (target == null) { - yield return Validation.Error($"{c}.Values[{i}].RelativePath({v.RelativePath} is not found"); + yield return Validation.Warning($"{c}.Values[{i}].RelativePath({v.RelativePath} is not found"); } } @@ -64,7 +64,7 @@ namespace VRM var v = c.MaterialValues[i]; if (!materialNames.Contains(v.MaterialName)) { - yield return Validation.Error($"{c}.MaterialValues[{i}].MaterialName({v.MaterialName} is not found"); + yield return Validation.Warning($"{c}.MaterialValues[{i}].MaterialName({v.MaterialName} is not found"); } } } diff --git a/Assets/VRM/UniVRM/Scripts/Format/glTF_VRMExtensions.cs b/Assets/VRM/UniVRM/Scripts/Format/glTF_VRMExtensions.cs index d4dc817e8..9e0955f6b 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/glTF_VRMExtensions.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/glTF_VRMExtensions.cs @@ -19,7 +19,12 @@ namespace VRM public static glTF_VRM_BlendShapeBind Create(Transform root, BlendShapeBinding binding, gltfExporter exporter) { - var transform = UniGLTF.UnityExtensions.GetFromPath(root.transform, binding.RelativePath); + var transform = root.transform.Find(binding.RelativePath); + if (transform == null) + { + Debug.LogWarning($"{binding.RelativePath} not found"); + return null; + } var renderer = transform.GetComponent(); if (renderer == null) { @@ -38,7 +43,7 @@ namespace VRM return null; } - if(!exporter.MeshBlendShapeIndexMap.TryGetValue(mesh, out Dictionary blendShapeIndexMap)) + if (!exporter.MeshBlendShapeIndexMap.TryGetValue(mesh, out Dictionary blendShapeIndexMap)) { // この Mesh は エクスポートされていない return null;