init(name:)
Initializes a new uniform object.
Declaration
init(name: String)Parameters
- name:
The name used to identify the uniform variable; you use this name inside your shader to read the uniform variable’s value.
Return Value
An initialized uniform object.
Discussion
A uniform initialized with this method has no initial type and cannot be used in a shader until it is given an initial value. To set the initial value, use one of the properties defined in SKUniform. After its value is set, its uniformType property is set to match the uniform’s new type. Once set, the type may not be changed.