Esempio n. 1
0
        // Draw the line, and record any changes performed via the GUI
        private Vector3 ShowPoint(int i)
        {
            Vector3 point = handleTransform.TransformPoint(curve.points[i]);

            EditorGUI.BeginChangeCheck();
            point = Handles.DoPositionHandle(point, handleRotation);

            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(curve, "Move Point");
                EditorUtility.SetDirty(curve);

                curve.points[i] = handleTransform.InverseTransformPoint(point);
            }

            return(point);
        }