mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-06-13 11:21:24 -05:00
Merge pull request #1244 from ousttrue/fix/throw
Fix throw by First. Use FirstOrDefault
This commit is contained in:
commit
3ebced6fd7
|
|
@ -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