public override void OnInspectorGUI()
        {
            _spline = target as SplinePath;

            EditorGUI.BeginChangeCheck();
            bool linkMidPoint = EditorGUILayout.Toggle("Link Mid Point", _spline.linkMidPoint);

            if (EditorGUI.EndChangeCheck())
            {
                _spline.linkMidPoint = linkMidPoint;
            }

            if (_selectedIndex >= 0 && _selectedIndex < _spline.ControlPointCount)
            {
                DrawSelectedPointInspector();
            }

            if (GUILayout.Button("Add Curve"))
            {
                Undo.RecordObject(_spline, "Add Curve");
                _spline.AddCurve();
                EditorUtility.SetDirty(_spline);
            }

            if (_spline.ControlPointCount > 4)
            {
                if (GUILayout.Button("Remove Curve"))
                {
                    Undo.RecordObject(_spline, "Remove Curve");
                    _spline.RemoveCurve();
                    EditorUtility.SetDirty(_spline);
                }
            }
        }