---
title: LevelOfDetailComponent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/levelofdetailcomponent
---

# LevelOfDetailComponent

A component that enables Level of Detail (LOD) optimization for entities with multiple detail levels.

## Declaration

```swift
struct LevelOfDetailComponent
```

## Overview

Overview The component allows entities to automatically show/hide child entities based on viewing conditions, reducing rendering complexity for distant or small objects.

## Topics

### Creating a component

- [init(levels:switchingAt:)](realitykit/levelofdetailcomponent/init(levels:switchingat:).md)
- [addByCameraDistance(to:levels:)](realitykit/levelofdetailcomponent/addbycameradistance(to:levels:).md)
- [addByScreenArea(to:levels:)](realitykit/levelofdetailcomponent/addbyscreenarea(to:levels:).md)
- [addByResolutionMetric(to:levels:boundingBox:)](realitykit/levelofdetailcomponent/addbyresolutionmetric(to:levels:boundingbox:).md)

### Configuring detail levels

- [levels](realitykit/levelofdetailcomponent/levels.md)
- [LevelOfDetailComponent.DetailLevel](realitykit/levelofdetailcomponent/detaillevel.md)

### Choosing a level

- [strategy](realitykit/levelofdetailcomponent/strategy.md)
- [LevelOfDetailComponent.SelectionStrategy](realitykit/levelofdetailcomponent/selectionstrategy.md)
- [levelSelection](realitykit/levelofdetailcomponent/levelselection-swift.property.md)
- [LevelOfDetailComponent.LevelSelection](realitykit/levelofdetailcomponent/levelselection-swift.struct.md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)
