Hi,
In a packaged (or ‘cooked’) game, dynamic loading of non-cooked content is not supported. For content to be referenced by code you would need to use the FObjectFinder in your classes constructor instead of a plain old LoadObject(). For example:
AReproAnimBPCharacter::AReproAnimBPCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
static ConstructorHelpers::FObjectFinder<UAnimBlueprint> AnimationBPFinder(TEXT("AnimBlueprint'/Game/ThirdPerson/Animations/ThirdPerson_AnimBP.ThirdPerson_AnimBP'"));
AnimationBP = AnimationBPFinder.Object;
}
This will ensure that the packaging process picks up the fact that the game needs to reference this asset.
See [here][1] for documentation on this.
Gameplay Classes in Unreal Engine | Unreal Engine 5.1 Documentation