static void DrawGizmos(SplineSmooth path, GizmoType selectionType) { SplineEditor.DrawPathGizmo(path, (Selection.activeGameObject == path.gameObject) ? path.Appearances.PathColor : path.Appearances.InactivePathColor); DrawGuizmosUnselected(path); }
private static void CreateSpline() { GameObject splineObj = new GameObject("Spline"); Spline spline = splineObj.AddComponent <Spline>(); Undo.RegisterCreatedObjectUndo(splineObj, "Create Spline"); Selection.activeGameObject = splineObj; SceneView.lastActiveSceneView.MoveToView(splineObj.transform); GameObjectUtility.EnsureUniqueNameForSibling(splineObj); Editor splineEditorGeneric = CreateEditor(spline, typeof(SplineEditor)); SplineEditor splineEditor = (SplineEditor)splineEditorGeneric; splineEditor.ConstructSpline(); }