コード例 #1
0
        private static void Smooth()
        {
            GameObject selected = Selection.activeObject as GameObject;
            Spline     spline   = selected.GetComponentInParent <Spline>();

            SplineBaseEditor.Smooth(spline);
        }
コード例 #2
0
        private static void SetMode(GameObject selected, ControlPointMode mode)
        {
            Spline spline = selected.GetComponentInParent <Spline>();

            if (spline == null)
            {
                return;
            }

            SplineControlPoint selectedControlPoint = selected.GetComponent <SplineControlPoint>();

            if (selectedControlPoint != null)
            {
                SplineBaseEditor.SetMode(spline, mode, selectedControlPoint.Index);
            }
            else
            {
                SplineBaseEditor.SetMode(spline, mode);
            }
        }