# GetLODs()

> Returns the array of LODs.

## Definition

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

```csharp
public LOD[] GetLODs()
```

### Returns

| Type                                                          | Description    |
| ------------------------------------------------------------- | -------------- |
| [LOD\[\]](/engine/6000.7/script-reference/unityengine/lod.md) | The LOD array. |

### Remarks

```csharp
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

[ExecuteInEditMode]
public class DisplayLods : MonoBehaviour
{
#if UNITY_EDITOR
    void OnGUI()
    {
        // Display on the Game view top level information of each LOD for the selected LODGroup.
        if (gameObject != Selection.activeGameObject)
            return;

        var lodGroup = GetComponent<LODGroup>();

        if (lodGroup && gameObject == Selection.activeGameObject)
        {
            LOD[] lods = lodGroup.GetLODs();

            GUILayout.BeginVertical(gameObject.name);
            for (int i=0 ; i<lods.Length ; i++)
            {
                LOD lod = lods[i];

                GUILayout.Label($"LOD {i} : Renderer count = {lod.renderers.Length}, Fade trans. width = {lod.fadeTransitionWidth}, Screen rel. trans. height = {lod.screenRelativeTransitionHeight}");
            }
            GUILayout.EndVertical();
        }
    }
#endif
}
```

Additional Resources: [LOD](/engine/6000.7/script-reference/unityengine/lod.md), [LODGroup.SetLODs](/engine/6000.7/script-reference/unityengine/lodgroup/setlods.md)
