UPostProcessComponent is null - Unreal VR Dev Section 1-15


I’m stuck at this section (1-15: Dynamic Material Instances), it looks like the UPostProcessComponent I intent to use is always null, I checked the video multiple times and I can’t find what could be the reason for it to be null.

Header file looks like this

class UPostProcessComponent* PostProcessComponent;

CPP file looks like this


PrimaryActorTick.bCanEverTick = true;

VRRoot = CreateDefaultSubobject<USceneComponent>(TEXT("VRRoot"));


Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));


DestinationMarker = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("DestinationMarker"));


PostProcessComponent = CreateDefaultSubobject<UPostProcessComponent>(TEXT("PostProcessComponent"));



BeginPlay event inside CPP file looks like this:

void AVRCharacter::BeginPlay()




if(BlinkerMaterialBase != nullptr)


    BlinkerMaterialInstance = UMaterialInstanceDynamic::Create(BlinkerMaterialBase, this);

    if(PostProcessComponent != nullptr)


        UE_LOG(LogTemp, Warning, TEXT("PostProcess Is not null"));


        BlinkerMaterialInstance->SetScalarParameterValue(TEXT("Radius"), 0.2);




        UE_LOG(LogTemp, Warning, TEXT("Is null"));




Game was crashing without checking if PostProcessComponent was null, everything was working so fine until this point, the post process was working just fine before the dynamic code, the output log looks like this:

LogTemp: Warning: Is null

I would really appreciate any help you can provide :slight_smile: my UE version is 4.26.2.

Thank you so much!

I found someone in Udemy Q&A that had the same problem a year ago and the solution was to downgrade UE to 4.24, I tried that but since all the assets are newer the map and bp are no longer working.

You could also try refreshing the blueprint. Sometimes they can cache the wrong value. Right click the blueprint > asset actions > reload.

Hi Sam! I tried reloading the blueprint like you suggested but didn’t work :frowning: