OK, I finally figured out how to do this. The key part was using a material I’ve created with the appropriate parameter definitions as the parent material. Otherwise, the parameter settings have no effect since nothing usese them. For example, if you have an FLinearColor or something similar connected to the “Color” or “Emissive Color” node of your base material, then you right click the connector on the linearcolor and select “add parameter”. Then, when you set that parameter, it’s like that input changes! Here’s my code when this worked:
MeshComponent = CreateDefaultSubobject< UStaticMeshComponent >(
TEXT("MeshComponent") );
MeshComponent->SetMobility( EComponentMobility::Movable );
MeshComponent->SetStaticMesh( Mesh );
// WhiteMaterial is a material asset found earlier, with a paramterized connection to "Emissive Color"
UMaterialInstanceDynamic * DynamicMaterial =
UMaterialInstanceDynamic::Create( WhiteMaterial, NULL );
DynamicMaterial->SetVectorParameterValue( FName("Color"),
FLinearColor( 100.0f, 0.0f, 0.0f ) );
MeshComponent->SetMaterial( 0, DynamicMaterial );