diff --git a/Runtime/Procedural/Mesh/MeshGeometry.cs b/Runtime/Procedural/Mesh/MeshGeometry.cs index 1036f89..61be192 100644 --- a/Runtime/Procedural/Mesh/MeshGeometry.cs +++ b/Runtime/Procedural/Mesh/MeshGeometry.cs @@ -496,7 +496,7 @@ namespace Rokojori for ( int i = 0; i < normals.Count; i++ ) { var yPositionAmount = MathX.RemapClamped( vertices[ i ].Y, startY, endY, 0, 1 ); - var blendAmount = curve.Sample( yPositionAmount ) * amount; + var blendAmount = ( curve == null ? 1f : curve.Sample( yPositionAmount ) ) * amount; blendAmount = MathX.Clamp01( blendAmount ); normals[ i ] = Math3D.BlendNormals( normals[ i ], direction, blendAmount ); }