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(); } } }