private void DrawSplineInspector(MeshCreator meshCreator, List <Vector2> points, bool isClosed)
    {
        meshCreator.splineResolution     = EditorGUILayout.Slider("Resolution", meshCreator.splineResolution, CatmullRomSpline.MIN_RESOLUTION, 0.25f);
        meshCreator.splineSimplification = (SplineSimplification.Type)EditorGUILayout.EnumPopup("Simplify spline", meshCreator.splineSimplification);
        if (meshCreator.splineSimplification == SplineSimplification.Type.None)
        {
            return;
        }

        float area = CatmullRomSpline.BoundingBoxArea(points);

        if (meshCreator.splineSimplification == SplineSimplification.Type.ByRelativeBoundingBoxArea)
        {
            meshCreator.minRelativeSplineArea = EditorGUILayout.Slider("Minimal shape area percentage", meshCreator.minRelativeSplineArea, 0, 1, null);
            meshCreator.minAbsoluteSplineArea = meshCreator.minRelativeSplineArea * area;
            EditorGUI.BeginDisabledGroup(true);
            meshCreator.minAbsoluteSplineArea = EditorGUILayout.Slider("Minimal absolute area", meshCreator.minAbsoluteSplineArea, 0, area, null);
            EditorGUI.EndDisabledGroup();
        }
        else
        {
            meshCreator.minAbsoluteSplineArea = EditorGUILayout.Slider("Minimal absolute area", meshCreator.minAbsoluteSplineArea, 0, area, null);
            meshCreator.minRelativeSplineArea = Mathf.Clamp01(meshCreator.minAbsoluteSplineArea / area);
            EditorGUI.BeginDisabledGroup(true);
            meshCreator.minRelativeSplineArea = EditorGUILayout.Slider("Minimal shape area percentage", meshCreator.minRelativeSplineArea, 0, 1, null);
            EditorGUI.EndDisabledGroup();
        }
        var simplifiedPoints = GetSimplifiedSplinePoints(meshCreator, points, isClosed);

        if (points.Count != simplifiedPoints.Count)
        {
            EditorGUILayout.HelpBox("Point count: " + simplifiedPoints.Count + "/" + points.Count, MessageType.Info);
        }
    }