mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-24 23:18:04 -05:00
Fix throw by First. Use FirstOrDefault
This commit is contained in:
parent
024dadf9b3
commit
141076b18d
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user