Back to search
PatternGold tierMaterials

Create dynamic material and animate a parameter at runtime

Updated 3mo ago
UE 5.3UE 5.4UE 5.5UE 5.6UE 5.7#material#dynamic#parameter#animate#runtime#glow

Reference

Pattern: EventBeginPlay → GetMesh → CreateDynamicMaterialInstance(ElementIndex=0) → SetVariable(DynMat=ReturnValue). Then on Tick or timer: SetScalarParameterValue(ParameterName='Opacity', Value=SinWave). Or for color: SetVectorParameterValue(ParameterName='Color', Value=MakeLinearColor). Key: CreateDynamicMaterialInstance is called on the COMPONENT (GetMesh), not the actor. Must store the result before using Set*ParameterValue. ParameterName MUST match the name in the Material asset exactly.