Skip to main content

MaterialPropertyBlock.SetFloat(string name, number value)

Set a float property.

Parameters:

NameTypeDescription
namestringThe name of the property.
valuenumberThe float value to set.

Usage

---@type MaterialPropertyBlock
local materialpropertyblock;

---@type string
local name;

---@type number
local value;


materialpropertyblock.SetFloat(name, value)

Extra Detail

Adds a property to the block. If a float property with the given name already exists, the old value is replaced.