# GetVisiblePositions

> Get the visible positions of all vertices in the trail.

## Definition

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

## GetVisiblePositions(Vector3\[])

Get the visible positions of all vertices in the trail.

```csharp
public int GetVisiblePositions(Vector3[] positions)
```

### Parameters

**** (\[Vector3\[]]\(/engine/6000.0/script-reference/unityengine/vector3)): The array of positions to retrieve.

### Returns

| Type                                                       | Description                                                  |
| ---------------------------------------------------------- | ------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | How many positions were actually stored in the output array. |

### Remarks

This method is similar to [TrailRenderer.GetPositions](/engine/6000.0/script-reference/unityengine/trailrenderer/getpositions.md), except that it will not return positions that the Trail Renderer created while [TrailRenderer.emitting](/engine/6000.0/script-reference/unityengine/trailrenderer/emitting.md) was set to `false`.

## GetVisiblePositions(NativeArray\<Vector3>)

Get the visible positions of all vertices in the trail.

```csharp
public int GetVisiblePositions(NativeArray<Vector3> positions)
```

### Parameters

**** (\[NativeArray\<Vector3>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): The array of positions to retrieve.

### Returns

| Type                                                       | Description                                                  |
| ---------------------------------------------------------- | ------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | How many positions were actually stored in the output array. |

### Remarks

This method is similar to [TrailRenderer.GetPositions](/engine/6000.0/script-reference/unityengine/trailrenderer/getpositions.md), except that it will not return positions that the Trail Renderer created while [TrailRenderer.emitting](/engine/6000.0/script-reference/unityengine/trailrenderer/emitting.md) was set to `false`.

## GetVisiblePositions(NativeSlice\<Vector3>)

Get the visible positions of all vertices in the trail.

```csharp
public int GetVisiblePositions(NativeSlice<Vector3> positions)
```

### Parameters

**** (\[NativeSlice\<Vector3>]\(/engine/6000.0/script-reference/unity/collections/nativeslice1)): The array of positions to retrieve.

### Returns

| Type                                                       | Description                                                  |
| ---------------------------------------------------------- | ------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | How many positions were actually stored in the output array. |

### Remarks

This method is similar to [TrailRenderer.GetPositions](/engine/6000.0/script-reference/unityengine/trailrenderer/getpositions.md), except that it will not return positions that the Trail Renderer created while [TrailRenderer.emitting](/engine/6000.0/script-reference/unityengine/trailrenderer/emitting.md) was set to `false`.
