Skip to content

Commit

Permalink
Fix throw by First. Use FirstOrDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
ousttrue committed Sep 24, 2021
1 parent 024dadf commit 141076b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/VRM/Runtime/Extensions/glTF_VRMExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static glTF_VRM_BlendShapeBind Create(Transform root, BlendShapeBinding b
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");
Expand Down

0 comments on commit 141076b

Please sign in to comment.