Merge pull request #537 from ousttrue/fix/fix_export_dialog

エクスポートダイアログの修正
This commit is contained in:
hiroj
2020-09-01 13:06:41 +09:00
committed by GitHub
3 changed files with 15 additions and 9 deletions

View File

@@ -516,8 +516,6 @@ namespace VRM
}
GUILayout.EndVertical();
}
if (modified)
InvokeWizardUpdate();
GUILayout.Space(8);
}
@@ -723,4 +721,3 @@ namespace VRM
}
}
}

View File

@@ -14,7 +14,7 @@ namespace VRM
yield break;
}
var hierarchy = root.GetComponentsInChildren<Transform>();
var hierarchy = root.GetComponentsInChildren<Transform>(true);
Dictionary<Transform, List<VRMSpringBone>> rootMap = new Dictionary<Transform, List<VRMSpringBone>>();
@@ -25,12 +25,17 @@ namespace VRM
var springRoot = sb.RootBones[i];
if (springRoot == null)
{
yield return Validation.Error($"{sb.name}.RootBones[{i}] is null");
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is null");
continue;
}
if (!hierarchy.Contains(springRoot))
{
yield return Validation.Error($"{sb.name}.RootBones[{i}] is out of hierarchy");
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is out of hierarchy");
continue;
}
if (!springRoot.gameObject.activeInHierarchy)
{
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is not active");
continue;
}

View File

@@ -52,18 +52,22 @@ namespace VRM
public IEnumerable<Validation> Validate()
{
var hierarchy = GetComponentsInChildren<Transform>();
var hierarchy = GetComponentsInChildren<Transform>(true);
for (int i = 0; i < Renderers.Count; ++i)
{
var r = Renderers[i];
if (r.Renderer == null)
{
yield return Validation.Error($"{name}.Renderers[{i}].Renderer is null");
yield return Validation.Error($"[VRMFirstPerson]{name}.Renderers[{i}].Renderer is null");
}
if (!hierarchy.Contains(r.Renderer.transform))
{
yield return Validation.Error($"{name}.Renderers[{i}].Renderer is out of hierarchy");
yield return Validation.Error($"[VRMFirstPerson]{name}.Renderers[{i}].Renderer is out of hierarchy");
}
if (!r.Renderer.gameObject.activeInHierarchy)
{
yield return Validation.Error($"[VRMFirstPerson]{name}.Renderers[{i}].Renderer is not active");
}
}
yield break;