Skip to main content

MaterialPropertyBlock.GetColor(string name)

Get a color from the property block.

Parameters:

NameTypeDescription
namestringThe name of the property.

Returns:

typeDescription
Colorcolor from the property block.

Usage

---@type MaterialPropertyBlock
local materialpropertyblock;

---@type string
local name;


local val0 = materialpropertyblock.GetColor(name)

Extra Detail

Returns (0, 0, 0, 0) if not found. If the value is previously set using SetColor, the returned value is converted from the currently active color space back to the sRGB color space.