Hi all, I recently started using UMG for my project, and have some widgets that are loaded and created from C++, rather than Blueprints. But, for some reason it looks like they won’t load correctly when I try to run my packaged game. But, everything works fine in the editor. I was able to verify that the uassets for these blueprints are being copied correctly after the Cook, and they’re definitely there, so I’m puzzled as to what the issue could be.
Here is an excerpt from the logs when I start seeing these errors:
[2015.01.18-13.54.08:668][ 0]LogUObjectGlobals:Warning: Failed to find object 'Blueprint /Game/UI/Nameplate.Nameplate'
[2015.01.18-13.54.08:668][ 0]Error: CDO Constructor: Failed to find Blueprint'/Game/UI/Nameplate.Nameplate'
[2015.01.18-13.54.08:669][ 0]LogUObjectGlobals:Warning: Failed to find object 'Blueprint /Game/UI/DamageText.DamageText'
[2015.01.18-13.54.08:669][ 0]Error: CDO Constructor: Failed to find Blueprint'/Game/UI/DamageText.DamageText'
[2015.01.18-13.54.08:669][ 0]LogTemp:Warning: Instansiating medium armor
[2015.01.18-13.54.08:756][ 0]LogTemp:Warning: Instansiating medium armor
[2015.01.18-13.54.08:760][ 0]LogUObjectGlobals:Warning: Failed to find object 'Blueprint /Game/UI/PreGame/MainMenuUI.MainMenuUI'
[2015.01.18-13.54.08:760][ 0]Error: CDO Constructor: Failed to find WidgetBlueprint'/Game/UI/PreGame/MainMenuUI.MainMenuUI'
[2015.01.18-13.54.08:769][ 0]LogUObjectGlobals:Warning: Failed to find object 'Blueprint /Game/UI/PreGame/Lobby.Lobby'
[2015.01.18-13.54.08:769][ 0]Error: CDO Constructor: Failed to find WidgetBlueprint'/Game/UI/PreGame/Lobby.Lobby'
[2015.01.18-13.54.08:769][ 0]LogTemp:Warning: Shield stopped
[2015.01.18-13.54.08:848][ 0]LogUObjectBase:Warning: -------------- Default Property warnings and errors:
[2015.01.18-13.54.08:848][ 0]LogUObjectBase:Warning: Error: CDO Constructor: Failed to find Blueprint'/Game/UI/Nameplate.Nameplate'
[2015.01.18-13.54.08:848][ 0]LogUObjectBase:Warning: Error: CDO Constructor: Failed to find Blueprint'/Game/UI/DamageText.DamageText'
[2015.01.18-13.54.08:848][ 0]LogUObjectBase:Warning: Error: CDO Constructor: Failed to find WidgetBlueprint'/Game/UI/PreGame/MainMenuUI.MainMenuUI'
[2015.01.18-13.54.08:848][ 0]LogUObjectBase:Warning: Error: CDO Constructor: Failed to find WidgetBlueprint'/Game/UI/PreGame/Lobby.Lobby'
Here’s how I am loading them in C++:
static ConstructorHelpers::FObjectFinder<UBlueprint> LobbyBlueprintObject(TEXT("WidgetBlueprint'/Game/UI/PreGame/Lobby.Lobby'"));
if (LobbyBlueprintObject.Object != NULL)
{
LobbyWidgetClass = (UClass*)LobbyBlueprintObject.Object->GeneratedClass;
}
I’ve tried packaging through the editor, with both PAK enabled and disabled, and have also tried packaging using RunUAT and the command below, also with the PAK option enabled and disabled, and every time I seem to fail with the same issue. I have also tried explicitly adding the content directory where these are stored as a -CookDir option, and that didn’t help.
RunUAT BuildCookRun -project="%CD%\Moonstorm.uproject" -Build -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -pak -nocompile -cook -maps=AllMaps -stage -archive -CookDir="%CD%\Content\UI" -archivedirectory="%CD%\Out"
Does anyone have any idea what I could be doing wrong here? Thanks!