x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Widget Blueprints that are only referenced in code are not cooked correctly

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!

Product Version: Not Selected
Tags:
more ▼

asked Jan 18 '15 at 02:11 PM in Packaging & Deployment

avatar image

tosslogic
88 8 10 14

avatar image tosslogic Jan 19 '15 at 12:39 AM

Not necessarily a solution, but I ended up just creating the widgets from BPs and assigning the UUserWidget pointer in my C++ class. This is not ideal, because it ends up with me either having to create a parent BP for all my BPs, or have a lot of repetition that I could otherwise avoid.

avatar image LemonLime123 Feb 02 '15 at 06:48 PM

Anybody figure out the reason behind this?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello, try using UClass instead of UBlueprint for your FObjectFinder, it worked well for me. You also have to change the path of your blueprint by adding '_C' . for your code that would give this

 static ConstructorHelpers::FObjectFinder<UClass> LobbyBlueprintObject(TEXT("/Game/UI/PreGame/Lobby.Lobby_C"));
 if (LobbyBlueprintObject.Object != NULL)
 {
 LobbyWidgetClass = LobbyBlueprintObject.Object;
 }
more ▼

answered Feb 27 '15 at 09:17 AM

avatar image

Martin Esquirol
56 1 3 7

avatar image donggas90 Jun 27 '15 at 08:39 AM

Wow, it's amazing!

avatar image psychogony Jul 23 '15 at 07:16 AM

Wow, it's amazing!

Not sure if this is sarcasm... Base native classes are derived directly from UUserWidget. Base class is set in blueprints with Graph > Class settings. Works fine in editor, but refuses to package (Class not found errors). Tried casting to UBlueprint and UClass with and without _C suffix. Anyone else been here and solved this problem (was on 4.7.6, now on 4.8.2).
avatar image psychogony Jul 24 '15 at 09:08 AM

Doh! - I'm my case I had neglected to explicitly include the blueprints directory so the (unreferenced except in native code) blueprints weren't being cooked.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question