Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseGet a named vector value.
Four component vectors and colors are the same in Unity shaders. GetVector
does exactly the same
as GetColor just the input data type is different (xyzw
in the vector becomes rgba
in the color).
See Also: GetColor, SetVector, Shader.PropertyToID.