How to get reference to UGameplayEffect BP?

I can’t get reference to UGameplayEffect BP in C++

I tried:

const ConstructorHelpers::FObjectFinder<UGameplayEffect> SprintEffectAsset (TEXT("Blueprint'/Game/1TEST/IncreaseMoveSpeed/GE_MoveSpeed.GE_MoveSpeed'"));
SprintEffect = SprintEffectAsset.Object;

I got path to BP via right click → Copy Reference

I tried to add _C at the end of path, i tried to put UClass in FObjectFinder and then Cast.
None of this works.

Thanks for any help

Unfortunately I don’t think I have had the pleasure of loading a UGameplayEffect yet. . . but I intend to at some point. I noticed though that you are loading a Blueprint, and the closest I have is:

TSubclassOf<UMatineeCameraShake> CameraShakeComponent;

static ConstructorHelpers::FClassFinder<UCameraShake> CameraShake(TEXT("Blueprint'/Game/Blueprints/Common/SimpleShakeBlueprint'"));
if (CameraShake.Succeeded())
    CameraShakeComponent = CameraShake.Class;

Maybe that will be of some help. . . maybe not.

Thank you, it works

Full solution:


TSubclassOf<UGameplayEffect> SprintEffect;


static ConstructorHelpers::FClassFinder<UGameplayEffect> SprintEffectAsset (TEXT("Blueprint'/Game/1TEST/IncreaseMoveSpeed/GE_MoveSpeed.GE_MoveSpeed_C'"));
SprintEffect = SprintEffectAsset.Class;

Have to add _C at the end, don’t work without it