From 701444f592c7837f67f8d39d49fc63beb681f9ae Mon Sep 17 00:00:00 2001 From: gatosyocora Date: Thu, 8 Oct 2020 16:41:23 +0900 Subject: [PATCH] =?UTF-8?q?float=E6=9C=80=E5=B0=8F=E5=80=A4=E3=81=AE?= =?UTF-8?q?=E4=BB=A3=E3=82=8F=E3=82=8A=E3=81=AB0=E3=82=92=E8=BF=94?= =?UTF-8?q?=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs b/Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs index 5817419..eafaaae 100644 --- a/Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs +++ b/Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs @@ -141,8 +141,7 @@ private float CalculateAvatarHeight(Vector3 footPosition, private float CalculateMaxPositionInMesh(Transform meshTransform, Mesh mesh) { - if (mesh is null) return float.MinValue; - return mesh.vertices.Select(v => meshTransform.TransformPoint(v).y).Max(); + return mesh.vertices.Select(v => meshTransform.TransformPoint(v).y).DefaultIfEmpty().Max(); } } }