/// <summary> /// helper for drawing gizmos in the editor /// </summary> public static void drawGizmos(Vector3[] nodes, float resolution = 50, bool isInEditMode = false) { // horribly inefficient but it only runs in the editor var spline = new Spline(new List <Vector3>(nodes)); spline.drawGizmos(resolution, isInEditMode); }
public void OnDrawGizmosSelected() { // the editor will draw paths when force straight line is on if( !forceStraightLinePath ) { var spline = new Spline( nodes, useBezier, forceStraightLinePath ); if( closePath ) spline.closePath(); Gizmos.color = pathColor; spline.drawGizmos( pathResolution, isInEditMode ); } }
public void OnDrawGizmosSelected() { // the editor will draw paths when force straight line is on if (!forceStraightLinePath) { var spline = new Spline(nodes, useBezier, forceStraightLinePath); if (closePath) { spline.closePath(); } Gizmos.color = pathColor; spline.drawGizmos(pathResolution, isInEditMode); } }
/// <summary> /// helper for drawing gizmos in the editor /// </summary> public static void drawGizmos( Vector3[] nodes, float resolution = 50, bool isInEditMode = false ) { // horribly inefficient but it only runs in the editor var spline = new Spline( new List<Vector3>( nodes ) ); spline.drawGizmos( resolution, isInEditMode ); }