Summary
Sets a blittable of the material pass parameter. Cloning the Material
if required.
Syntax
public static void SetMaterialParameter<T>(this ModelComponent modelComponent, ValueParameterKey<T> parameter, T value, int materialIndex = 0, int passIndex = 0)
where T : struct
Type Parameters
Name |
Description |
T |
The type of value. |
Parameters
Name |
Type |
Description |
modelComponent |
ModelComponent |
The ModelComponent to update material parameter on. |
parameter |
ValueParameterKey<T> |
The parameter to update. |
value |
T |
The value. |
materialIndex |
int |
The index of the material to update. Default is 0. |
passIndex |
int |
The index of the pass of the material to update. Default is 0. |
Return Value