Skip to main content

LineRenderer.GetPropertyBlock(number materialIndex = -1)

Get per-Renderer or per-Material property block.

Parameters:

NameTypeDescription
materialIndexnumberThe index of the Material you want to get overridden parameters from. The index ranges from 0 to #Renderer.sharedMaterials-1.

Returns:

typeDescription
MaterialPropertyBlockper-Renderer or per-Material property block.

Usage

---@type LineRenderer
local linerenderer;

---@type number
local materialIndex;


local val0 = linerenderer.GetPropertyBlock(materialIndex)

Extra Detail

If you provide a Material index, only the parameters of that Material are retrieved.