Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

エクスポートダイアログの修正 #537

Merged
merged 3 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Assets/VRM/UniVRM/Editor/Format/VRMExporterWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,6 @@ private void OnGUI()
}
GUILayout.EndVertical();
}
if (modified)
InvokeWizardUpdate();

GUILayout.Space(8);
}
Expand Down Expand Up @@ -723,4 +721,3 @@ void OnWizardUpdate()
}
}
}

11 changes: 8 additions & 3 deletions Assets/VRM/UniVRM/Editor/SpringBone/VRMSpringBoneValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static IEnumerable<Validation> Validate(GameObject root)
yield break;
}

var hierarchy = root.GetComponentsInChildren<Transform>();
var hierarchy = root.GetComponentsInChildren<Transform>(true);

Dictionary<Transform, List<VRMSpringBone>> rootMap = new Dictionary<Transform, List<VRMSpringBone>>();

Expand All @@ -25,12 +25,17 @@ public static IEnumerable<Validation> Validate(GameObject root)
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;
}

Expand Down
10 changes: 7 additions & 3 deletions Assets/VRM/UniVRM/Scripts/FirstPerson/VRMFirstPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,22 @@ public Mesh SharedMesh

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;
Expand Down