---
title: constantValues
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlfunctiondescriptor/constantvalues
---

# constantValues

The set of constant values assigned to the function constants.

## Declaration

```swift
@NSCopying var constantValues: MTLFunctionConstantValues? { get set }
```

## Discussion

Discussion The default value is nil. If you are creating a function object for a specialized function, you need to provide an array of valid constant values for all required function constants.

## See Also

### Specifying the function configuration

- [name](metal/mtlfunctiondescriptor/name.md)
- [specializedName](metal/mtlfunctiondescriptor/specializedname.md)
- [options](metal/mtlfunctiondescriptor/options.md)
- [binaryArchives](metal/mtlfunctiondescriptor/binaryarchives.md)
- [MTLFunctionOptions](metal/mtlfunctionoptions.md)
- [MTLLinkedFunctions](metal/mtllinkedfunctions.md)
