To set a Material's parameter from UnrealScript you will need either a MaterialInstanceConstant(UDK, UT3) or a MaterialInstanceTimeVarying(UDK, UT3). If you only have aMaterial(UDK, UT3), you will need to create a MaterialInstance for that first.
Once you have a MaterialInstance, you can use its Set*() functions to assign a value to any of the material's parameters, for example:
theMaterialInstance.SetTextureParameterValue('aTextureParameter', someTexture); theMaterialInstance.SetTextureParameterValue('aVectorParameter', FancyLinearColor); theMaterialInstance.SetTextureParameterValue('aScalarParameter', CoolEffectSpeed);
You can reset all parameters to their defaults by calling the MaterialInstance's ClearParameterValues() function.
Page Categories
Page Information
2022-11-22T07:02:15.439854Z
2010-03-17T17:37:36Z
Wormbo
moved [[Set the Material parameter]] to [[UE3:Set the Material parameter]]: UE3-specific
https://wiki.beyondunreal.com/UE3:Set the Material parameter
Attribution-NonCommercial-ShareAlike 3.0