Skip to main content

Renderer.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 Renderer
local renderer;

---@type number
local materialIndex;


local val0 = renderer.GetPropertyBlock(materialIndex)

Extra Detail

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