πŸͺ„ DynamicMaterialInstance


πŸŽ’ Example

local MyMaterialInstance = DynamicMaterialInstance(
    "/Game/MyAssetPack/MyMaterial"
)

πŸ›  Constructor

local MyMaterialInstance = DynamicMaterialInstance(
    MaterialPath, OptionalName, CreationFlags
)
Type
Name
Default

MaterialPath

0

OptionalName

Color.BLACK

CreationFlags

CreationFlags.None


🦠 Functions

SetScalarParameter

Sets a scalar parameter to the material

MyMaterialInstance:SetScalarParameter(ParameterName, Value)
Type
Parameter
Description

ParameterName

Value

SetVectorParameter

Sets a vector parameter to the material

MyMaterialInstance:SetVectorParameter(ParameterName, Value)
Type
Parameter
Description

ParameterName

Value

SetDoubleVectorParameter

Sets a vector4 parameter to the material

MyMaterialInstance:SetDoubleVectorParameter(ParameterName, Value)
Type
Parameter
Description

ParameterName

Value

SetTextureParameterValue

Sets a texture parameter to the material

MyMaterialInstance:SetTextureParameterValue(ParameterName, Value)
Type
Parameter
Description

ParameterName

Value

URL & Asset Path supported

Destroy

Destroys this dynamic material instance

MyMaterialInstance:Destroy()

Last updated