Format
typescript
Material.SetFloat(name, value)class: Material
Description
Set the Float value of the current material.
This method assigns the specified floating-point value to the property of the material.
Parameters
| param_name | type | description |
|---|---|---|
| name | string | Name of the property |
| value | number | Float value |
Return
| type | description |
|---|---|
void |
Code Example
typescript
let material = Resources.Load<Material>(Material, "materialId");
material.SetFloat("_Float",5);
let _Float = material.GetFloat("_Float");
Debug.Log("_Float : ",_Float)