# DrawLineStrip(ReadOnlySpan<Vector3>, bool)

> Draws a line between each point in the supplied span.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static void DrawLineStrip(ReadOnlySpan<Vector3> points, bool looped)
```

### Parameters

**** (\[ReadOnlySpan\<Vector3>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The points that define the sequence of lines to draw. The function draws a line between each point and the one that follows it.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to draw an additional line between the last point and the first. When this is `true`, Unity draws an additional line between `points[points.Length - 1]` and `points[0]`.  When this is `false`, the lines terminate at the last point.

### Remarks

This function provides a more efficient way to draw multiple lines than repeatedly calling the [Gizmos.DrawLine](/engine/6000.5/script-reference/unityengine/gizmos/drawline.md) function for each one.

Unity draws the first line from `points[0]` to `points[1]`, the next from `points[1]` to `points[2]`, and so on.

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    Vector3[] points;

    void Start()
    {
        points = new Vector3[4]
        {
            new Vector3(-100, 0, 0),
            new Vector3(100, 0, 0),
            new Vector3(100, 100, 0),
            new Vector3(-100, 100, 0)
        };
    }

    void OnDrawGizmosSelected()
    {
        // Draws four lines making a square
        Gizmos.color = Color.blue;
        Gizmos.DrawLineStrip(points, true);
    }
}
```

Additional Resources: [Gizmos.DrawLine](/engine/6000.5/script-reference/unityengine/gizmos/drawline.md), [Gizmos.DrawLineList](/engine/6000.5/script-reference/unityengine/gizmos/drawlinelist.md).
