# GetLods

> Gets an array containing the Mesh LOD ranges (index start and index count) for a given Mesh LOD.

## Definition

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

## GetLods(int)

Gets an array containing the Mesh LOD ranges (index start and index count) for a given Mesh LOD.

```csharp
public MeshLodRange[] GetLods(int submesh)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Returns

| Type                                                                            | Description                                 |
| ------------------------------------------------------------------------------- | ------------------------------------------- |
| [MeshLodRange\[\]](/engine/6000.7/script-reference/unityengine/meshlodrange.md) | Index ranges for all LODs in this sub-mesh. |

### Remarks

Note that the Mesh LOD range is relative to the sub-mesh holding the LOD. See [MeshLodRange](/engine/6000.7/script-reference/unityengine/meshlodrange.md) for more information.

## GetLods(List\<MeshLodRange>, int)

Gets all index ranges for a given sub-mesh.

```csharp
public void GetLods(List<MeshLodRange> levels, int submesh)
```

### Parameters

**** (\[List\<MeshLodRange>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Sub-mesh to get LODs from.

### Remarks

Note that the Mesh LOD range is relative to the sub-mesh holding the LOD. See [MeshLodRange](/engine/6000.7/script-reference/unityengine/meshlodrange.md) for more information.
