Fix throw by First. Use FirstOrDefault

This commit is contained in:
ousttrue 2021-09-24 19:15:22 +09:00
parent 024dadf9b3
commit 141076b18d

View File

@ -32,7 +32,7 @@ namespace VRM
if (found == null)
{
var name = binding.RelativePath.Split('/').Last();
found = root.GetComponentsInChildren<Transform>().Where(x => x.name == name).First();
found = root.GetComponentsInChildren<Transform>().Where(x => x.name == name).FirstOrDefault();
if (found == null)
{
Debug.LogWarning($"{binding.RelativePath} not found");