---
title: "constantLocation(named:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelmaterialparametermapping/constantlocation(named:)"
---

# constantLocation(named:)

Returns the resolved buffer and constant indices for the named constant parameter, or nil if no parameter with that name exists.

## Declaration

```swift
func constantLocation(named name: String) -> LowLevelMaterialParameterMapping.ConstantLocation?
```

## Parameters

- `name`: The name of the constant parameter as declared in the Metal shader.

## Return Value

Return Value A LowLevelMaterialParameterMapping.ConstantLocation with the buffer and constant indices, or nil if no constant parameter with that name exists.

## See Also

### Locating parameters

- [bufferLocation(named:)](realitykit/lowlevelmaterialparametermapping/bufferlocation(named:).md)
- [textureLocation(named:)](realitykit/lowlevelmaterialparametermapping/texturelocation(named:).md)
- [LowLevelMaterialParameterMapping.ConstantLocation](realitykit/lowlevelmaterialparametermapping/constantlocation.md)
