mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-23 19:15:07 -05:00
Fix throw by First. Use FirstOrDefault
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user