---
title: "resolutionMetric(switchingResolutions:boundingBox:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/levelofdetailcomponent/selectionstrategy/resolutionmetric(switchingresolutions:boundingbox:)"
---

# resolutionMetric(switchingResolutions:boundingBox:)

Creates a resolution metric for a level of detail component to switch with.

## Declaration

```swift
static func resolutionMetric(switchingResolutions: [LevelOfDetailComponent.SelectionStrategy.ResolutionMetric.DirectionalSwitchingResolutions], boundingBox: BoundingBox) -> LevelOfDetailComponent.SelectionStrategy
```

## Parameters

- `switchingResolutions`: An array of ResolutionMetric.DirectionalSwitchingResolutions. The ResolutionMetric.DirectionalSwitchingResolutions at index i corresponds to the LOD level i + 1.
- `boundingBox`: The bounding box of the entity used when calculating the switching resolutions .

## Return Value

Return Value A configured resolution metric selection strategy.

## See Also

### Selecting by resolution metric

- [LevelOfDetailComponent.SelectionStrategy.ResolutionMetric](realitykit/levelofdetailcomponent/selectionstrategy/resolutionmetric.md)
