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
commit 3ebced6fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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