UMaterialParameterCollectionInstance and MinimalAPI

Hi, I can’t call UMaterialParameterCollectionInstance::SetScalarParameterValue() since it’s not exported and since UMaterialParameterCollectionInstance uses MinimalAPI.

Is there another way of changing a parameter from C++ that I’m not aware of or is this a bug?

You can use the Blueprint material library functions.

#include "Runtime/Engine/Classes/Kismet/KismetMaterialLibrary.h"
...
UKismetMaterialLibrary::SetScalarParameterValue(GetWorld(), MyParameterCollection, SomeName, 0.5f);

Thank you!

Then, how to get your “MyParameterCollection” in the third line ?

oh, i get it, just like this,MyParameterCollection= LoadObject(NULL, TEXT(“/Game/Materials/MPC_PP”), NULL, LOAD_None, NULL);