Renderer.GetPropertyBlock(number materialIndex = -1)
Get per-Renderer or per-Material property block.
Parameters:
Name | Type | Description |
---|---|---|
materialIndex | number | The index of the Material you want to get overridden parameters from. The index ranges from 0 to #Renderer.sharedMaterials-1. |
Returns:
type | Description |
---|---|
MaterialPropertyBlock | per-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.