> For the complete documentation index, see [llms.txt](https://enoch-app.gitbook.io/enoch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enoch-app.gitbook.io/enoch/developers-integration-guide/unity-integration/code-examples/distance-based-lods.md).

# Distance-based LODs

The Enoch Avatar Loader module includes an AvatarLod example that can be imported from the Unity Package Manager window.

{% hint style="info" %}
After importing the AvatarLod sample you can find the code sample in\
**Assets/Samples/Enoch Avatar Loader/1.0.0/AvatarLod/AvatarLodExample.cs**
{% endhint %}

This example demonstrates how to load multiple levels of detail (LOD) for avatar meshes and configure distance-based render optimization. By enabling LOD, Unity displays the appropriate LOD level for the rendered avatar based on the avatar's distance from the camera.

Using the [Avatar API ](/enoch/developers-integration-guide/unity-integration/load-avatars.md)and [Avatar Configurations](/enoch/developers-integration-guide/unity-integration/optimize/avatar-configuration.md), this approach downloads multiple avatar LODs, extracts the avatar meshes, and configures the final avatar with LOD support enabled.

{% hint style="warning" %}
This example does not support Avatar Configurations with TextureAtlas=None.
{% endhint %}
