# SetWidth(float, float)

> Set the line width at the start and at the end.

## Definition

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

> **Warning:**
>
> **Deprecated.** Use startWidth, endWidth or widthCurve instead.

```csharp
public void SetWidth(float start, float end)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The width at the start of the line.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The width at the end of the line.

### Remarks

Additional Resources: [LineRenderer.startWidth](/engine/6000.0/script-reference/unityengine/linerenderer/startwidth.md), [LineRenderer.endWidth](/engine/6000.0/script-reference/unityengine/linerenderer/endwidth.md) or [LineRenderer.widthCurve](/engine/6000.0/script-reference/unityengine/linerenderer/widthcurve.md) properties.

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Adds a lineRenderer to this transform and
    // Converts the line Renderer into a triangle.

    void Start()
    {
        LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
        lineRenderer.SetWidth(0, 3);
    }
}
```
