The values of each attribute associated with the node's attached shader.
Deprecated
Attributes are only available to node classes supporting SKShader
, such as SKSprite
, SKEffect
and SKShape
.
SDKs
- iOS 10.0–10.0Deprecated
- macOS 10.12–10.12Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 10.0–10.0Deprecated
- watchOS 3.0–3.0Deprecated
Framework
- Sprite
Kit
Declaration
var attributeValues: [String : SKAttribute Value] { get set }
Discussion
All nodes have their own copy of an attribute value and therefore the attribute values can be different across the same SKShader
. If instead you need all nodes to share the same value, use SKUniform
. Uniforms can change values every frame, but uniforms cannot vary per-node like attributes can.