LineRenderer.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 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.