> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_line_renderer.md).

# LineRenderer

**Usage:** `api.LineRenderer.SetPosition(lr, 0, pos)`

Wrappers around UnityEngine.LineRenderer.

## Public Functions

|                     | Name                                                                                                                                                                                                                                                                                                |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-setposition"><strong>SetPosition</strong></a>(UnityEngine.LineRenderer lr, int index, UnityEngine.Vector3 position)<br>Sets a vertex position on the line renderer.</p> |
| UnityEngine.Vector3 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-getposition"><strong>GetPosition</strong></a>(UnityEngine.LineRenderer lr, int index)<br>Gets a vertex position from the line renderer.</p>                             |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-startcolor"><strong>StartColor</strong></a>(UnityEngine.LineRenderer lr, int r, int g, int b, int a)<br>Sets the start color from 0-255 RGBA channels.</p>              |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-endcolor"><strong>EndColor</strong></a>(UnityEngine.LineRenderer lr, int r, int g, int b, int a)<br>Sets the end color from 0-255 RGBA channels.</p>                    |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-startwidth"><strong>StartWidth</strong></a>(UnityEngine.LineRenderer lr, float width)<br>Sets the start width of the line.</p>                                          |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-endwidth"><strong>EndWidth</strong></a>(UnityEngine.LineRenderer lr, float width)<br>Sets the end width of the line.</p>                                                |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_line_renderer.md#function-setmaterial"><strong>SetMaterial</strong></a>(UnityEngine.LineRenderer lr, string shaderName)<br>Assigns a new material built from the named shader.</p>                |

## Public Functions Documentation

### function SetPosition

```csharp
static void SetPosition(
    UnityEngine.LineRenderer lr,
    int index,
    UnityEngine.Vector3 position
)
```

Sets a vertex position on the line renderer.

**Parameters**:

* **lr** The line renderer.
* **index** Vertex index.
* **position** World position.

### function GetPosition

```csharp
static UnityEngine.Vector3 GetPosition(
    UnityEngine.LineRenderer lr,
    int index
)
```

Gets a vertex position from the line renderer.

**Parameters**:

* **lr** The line renderer.
* **index** Vertex index.

**Return**: The vertex world position.

### function StartColor

```csharp
static void StartColor(
    UnityEngine.LineRenderer lr,
    int r,
    int g,
    int b,
    int a
)
```

Sets the start color from 0-255 RGBA channels.

**Parameters**:

* **lr** The line renderer.
* **r** Red 0-255.
* **g** Green 0-255.
* **b** Blue 0-255.
* **a** Alpha 0-255.

### function EndColor

```csharp
static void EndColor(
    UnityEngine.LineRenderer lr,
    int r,
    int g,
    int b,
    int a
)
```

Sets the end color from 0-255 RGBA channels.

**Parameters**:

* **lr** The line renderer.
* **r** Red 0-255.
* **g** Green 0-255.
* **b** Blue 0-255.
* **a** Alpha 0-255.

### function StartWidth

```csharp
static void StartWidth(
    UnityEngine.LineRenderer lr,
    float width
)
```

Sets the start width of the line.

**Parameters**:

* **lr** The line renderer.
* **width** Start width.

### function EndWidth

```csharp
static void EndWidth(
    UnityEngine.LineRenderer lr,
    float width
)
```

Sets the end width of the line.

**Parameters**:

* **lr** The line renderer.
* **width** End width.

### function SetMaterial

```csharp
static void SetMaterial(
    UnityEngine.LineRenderer lr,
    string shaderName
)
```

Assigns a new material built from the named shader.

**Parameters**:

* **lr** The line renderer.
* **shaderName** Shader to find and use.

***

Updated on 2026-07-22 at 12:00:00 +0800
