Hello,
I’m trying to assign a post process by default to a UPostProccessComponent but I can’t understand why I can’t add something to the blendables array.
Here is my code :
PostProcessComponent = PCIP.CreateDefaultSubobject<UPostProcessComponent>(this, TEXT("PostProcess"));
FPostProcessVolumeProperties prop = PostProcessComponent->GetProperties();
ConstructorHelpers::FObjectFinder<FMaterial> DefaultMaterial(TEXT("/Game/Materials/MonsterPostProcess"));
if (DefaultMaterial.Succeeded)
prop.Settings->Blendables.Add((UObject*)(DefaultMaterial.Object));
It says that my argument type is UObject* and it must be const TArray
I tried several things, like creating a TArray, adding my object and giving this array as a parameter for Blendables.Add, but it didn’t work either.
I know that the ‘const’ part is important but it’s been a while that I didn’t get to use C++ and I’m a bit lost