Ejemplo n.º 1
0
 static void DrawGizmos(SplineSmooth path, GizmoType selectionType)
 {
     SplineEditor.DrawPathGizmo(path,
                                (Selection.activeGameObject == path.gameObject)
         ? path.Appearances.PathColor : path.Appearances.InactivePathColor);
     DrawGuizmosUnselected(path);
 }
Ejemplo n.º 2
0
        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();
        }