Merge pull request #1244 from ousttrue/fix/throw

Fix throw by First. Use FirstOrDefault
This commit is contained in:
PoChang007
2021-09-29 17:37:16 +09:00
committed by GitHub

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");