/// <summary>
        /// Adds a new control point to the scene view and its drag point data
        /// to the game object.
        /// </summary>
        public void AddDragPointOnTraveller()
        {
            if (CurveTravellerControlPointIdx < 0 || CurveTravellerControlPointIdx >= ControlPoints.Count)
            {
                return;
            }

            var dragPoint = new DragPointData(DragPointInspector.DragPoints[CurveTravellerControlPointIdx])
            {
                IsLocked = false
            };

            var   newIdx            = CurveTravellerControlPointIdx + 1;
            float ratio             = (float)newIdx / DragPointInspector.DragPoints.Length;
            var   dragPointPosition = Transform.worldToLocalMatrix.MultiplyPoint(CurveTravellerPosition);

            dragPointPosition -= DragPointInspector.EditableOffset;
            dragPointPosition -= DragPointInspector.GetDragPointOffset(ratio);
            dragPoint.Center   = dragPointPosition.ToVertex3D();
            var dragPoints = DragPointInspector.DragPoints.ToList();

            dragPoints.Insert(newIdx, dragPoint);
            DragPointInspector.DragPoints = dragPoints.ToArray();

            ControlPoints.Insert(newIdx,
                                 new ControlPoint(
                                     DragPointInspector.DragPoints[newIdx],
                                     GUIUtility.GetControlID(FocusType.Passive),
                                     newIdx,
                                     ratio
                                     ));
            RebuildControlPoints();
        }
        private void InitSceneGui()
        {
            SelectedControlPoints.Clear();
            _flipAxis = Vector3.zero;

            //Setup Screen positions & controlID for control points (in case of modification of drag points coordinates outside)
            foreach (var controlPoint in ControlPoints)
            {
                controlPoint.WorldPos  = controlPoint.DragPoint.Center.ToUnityVector3();
                controlPoint.WorldPos += DragPointInspector.EditableOffset;
                controlPoint.WorldPos += DragPointInspector.GetDragPointOffset(controlPoint.IndexRatio);
                controlPoint.WorldPos  = Transform.localToWorldMatrix.MultiplyPoint(controlPoint.WorldPos);
                _flipAxis             += controlPoint.WorldPos;
                controlPoint.LocalPos  = Handles.matrix.MultiplyPoint(controlPoint.WorldPos);
                if (controlPoint.IsSelected)
                {
                    if (!controlPoint.DragPoint.IsLocked)
                    {
                        SelectedControlPoints.Add(controlPoint);
                    }
                }

                HandleUtility.AddControl(controlPoint.ControlId,
                                         HandleUtility.DistanceToCircle(controlPoint.LocalPos,
                                                                        HandleUtility.GetHandleSize(controlPoint.WorldPos) * ControlPoint.ScreenRadius *
                                                                        _sceneViewHandler.ControlPointsSizeRatio));
            }

            if (ControlPoints.Count > 0)
            {
                _flipAxis /= ControlPoints.Count;
            }

            //Setup PositionHandle if some control points are selected
            if (SelectedControlPoints.Count > 0)
            {
                _positionHandlePosition = Vector3.zero;
                foreach (var sCp in SelectedControlPoints)
                {
                    _positionHandlePosition += sCp.WorldPos;
                }

                _positionHandlePosition /= SelectedControlPoints.Count;
            }

            if (CurveTravellerVisible)
            {
                HandleUtility.AddControl(CurveTravellerControlId,
                                         HandleUtility.DistanceToCircle(Handles.matrix.MultiplyPoint(CurveTravellerPosition),
                                                                        HandleUtility.GetHandleSize(CurveTravellerPosition) * ControlPoint.ScreenRadius *
                                                                        _sceneViewHandler.CurveTravellerSizeRatio * 0.5f));
            }
        }