Problem with BlinkerMaterialBase

Hello Everyone,

I hope everyone is fine during this carzy time. I have create a topic because I have recently done this video and I have a weird problem. The part when we add the material at the the array under the post process is fine.
However, the second part when we create we BlinkerMaterialBase , not working as expected.

In the begin play,
Super::BeginPlay();

if (BlinkerMaterialBase != nullptr)
{
	BlinkerMaterialInstance = UMaterialInstanceDynamic::Create(BlinkerMaterialBase, this);
	PostProcessComponent->AddOrUpdateBlendable(BlinkerMaterialInstance);

	BlinkerMaterialInstance->SetScalarParameterValue(TEXT("Radius"), 0.2);
}
else
{
	UE_LOG(LogTemp, Warning, TEXT("No BlinkerBase "));
}

Unfortunately, I have never a BlinkerMaterialBase .

These are my declaration
UPROPERTY()
class UPostProcessComponent* PostProcessComponent;

UPROPERTY(EditAnywhere)
	class UMaterialInterface* BlinkerMaterialBase;

UPROPERTY()
	class UMaterialInstanceDynamic* BlinkerMaterialInstance;

I have check , in VRCharacter, I have already selected M_BlinkerMaterial (post process in material domain ) and it is in place.

So, I wonder if it is me, or the engine who is tricky ?

I have installed unreal 5.23.

Regards

Damien

Can you clarify what you mean by you never had a BlinkerMaterialBase? Are you getting a compile error?

Hi Bryan,
I don’t have a compile error, just no blinker.
When I press play, nothing happened.
No blinker in my headset or in my player character.
Nothing’s happening.

It’s like that my reference to the blinkerMaterialBase, it’s not existing.
My radius is very low (0.2) and when I add my material to the array in post processing. It’s work perfectly fine.
I have created an another project and paste Sam s code.
Do an another material.
Try different input.
Same result.
Alway No blinker base in UE_Log, so it’is normal nothing s happened because, no blinkerbase, no instance, nothibng add to the posprocesscommponent.
It’s very weird🤔.
I think , I have to create the blinker base in the construct. It the way in 5.23

If I write in the contruct
static ConstructorHelpers::FObjectFinder Material(TEXT("/Game/Material/M_BlinkerMaterial"));

if (Material.Object != NULL)
{
	BlinkerMaterialBase = (UMaterialInterface*)Material.Object;

That work, because I have attached my material to the pointer. I pretty sure that this is a problem between my blueprint and c++. Why when I add my material in blueprint, it is empty in my c++. It s like that the reference between them it’ s not working.
I have to bound something , or check an option ?
This time I have an error that block me that way

Edit 2: It is the same for the particule, I have created a UParticleSystem. Not working when spawn. The 5.23 have a big problem with reference

Solved, uninstall and re install the engine and everything go perfectly well.

Unbeliveble, I think the bug was twisting my VR Chartacter blueprint. Refusing to make my blueprint the Default pawn class in my game mode. Even in a new project, the blueprint stuggle. I think the installation of the version 5.23.3 must have had a problem.
New installation of the 5.25.3 and it’s working properly

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms