Instance Method

setValue(_:forAttribute:)

Sets an attribute value for an attached shader

Declaration

func setValue(_ value: SKAttributeValue, forAttribute key: String)

Parameters

value

An attribute value object containing the scalar or vector value to set in the attached shader.

key

The attribute name.

See Also

Setting a Node's Unique Attributes for a Shader

var attributeValues: [String : SKAttributeValue]

The values of each attribute associated with the node's attached shader.

Deprecated
func value(forAttributeNamed: String) -> SKAttributeValue?

The value of a shader attribute.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software