---
title: "value(forAttributeNamed:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/sktilemapnode/value(forattributenamed:)"
---

# value(forAttributeNamed:)

The value of a shader attribute.

## Declaration

```swift
func value(forAttributeNamed key: String) -> SKAttributeValue?
```

## Parameters

- `key`: The attribute name.

## Return Value

Return Value An attribute value object containing the scalar or vector value or nil if no such attribute exists.

## See Also

### Working with Custom Shaders

- [shader](spritekit/sktilemapnode/shader.md)
- [attributeValues](spritekit/sktilemapnode/attributevalues.md)
- [setValue(_:forAttribute:)](spritekit/sktilemapnode/setvalue(_:forattribute:).md)
