public static void Separate() { GameObject selected = Selection.activeObject as GameObject; SplineControlPoint ctrlPoint = selected.GetComponent <SplineControlPoint>(); Spline spline = selected.GetComponentInParent <Spline>(); SplineControlPointEditor.Separate(spline, ctrlPoint.Index); }
public static void CreateInBranch() { GameObject selected = Selection.activeGameObject as GameObject; SplineControlPoint ctrlPoint = selected.GetComponent <SplineControlPoint>(); Spline spline = selected.GetComponentInParent <Spline>(); SplineControlPointEditor.CreateBranch(spline, ctrlPoint.Index, true); }
private static void Remove() { GameObject selected = Selection.activeObject as GameObject; SplineControlPoint ctrlPoint = selected.GetComponent <SplineControlPoint>(); Spline spline = selected.GetComponentInParent <Spline>(); Selection.activeGameObject = spline.gameObject; SplineControlPointEditor.Remove(spline, ctrlPoint.Index); }