Description

Dynamically loaded animation blueprints do not work within packaged product.

Download the pre-made project from here: [Link Removed]

Steps to Reproduce

1. Create a 3rd person c++ project
2. Modify the code like this: in ReproAnimBP.h, replace #include "EngineMinimal.h" by #include "Engine.h" (just so we can use GEngine to print some message on screen)
3. in ReproAnimBPCharacter.h, declare the following:
virtual void PostInitializeComponents() override;
4. In ReproAnimBPCharacter.cpp, add the following:

 void AReproAnimBPCharacter::PostInitializeComponents()
 {
     Super::PostInitializeComponents();
 
     FString AnimBPStringTest = "AnimBlueprint'/Game/ThirdPerson/Animations/ThirdPerson_AnimBP.ThirdPerson_AnimBP'";
     //AnimationBP = Cast<UAnimBlueprint>(StaticLoadObject(UAnimBlueprint::StaticClass(), NULL, *AnimBPStringTest));
     UAnimBlueprint* AnimationBP = LoadObject<UAnimBlueprint>(NULL, *AnimBPStringTest);
     if (!AnimationBP) return;
     GEngine->AddOnScreenDebugMessage(-1, 50.f, FColor::Green, "anim BP OK");
 }

5. Build the files
6. Create a blueprint referencing your newly created c++ actor
7. PIE (notice the print on the screen)
8. Package for Windows and review the log

Expected: The print should appear in both PIE and the packaged version of the game.
Result: The log doesn't show up in game when the game is packaged.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.8.2
Target Fix4.8.2
CreatedJul 27, 2015
ResolvedJul 28, 2015
UpdatedApr 27, 2018
View Jira Issue