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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Packaging fail due to missing file

Hi,

So I have been trying to package a game which works in the editor perfectly for the last 3 days and have been failing repeatedly. The packaging log says that it can't find a file, and I am not sure why, so upon exploring I am not sure why this is happening as I will show here:

So in the main character class, ATMOCharacter, there is a UAnimBlueprint pointer

From the ATMOCharacter header file

 /** Pointer to Animation Blueprint corresponding to the Standard Character*/
 UPROPERTY(EditAnywhere, Category = AnimationBlueprints)
 UAnimBlueprint* StandardCharAnim;

Then, the blueprint class BP_ThirdPersonCharacter extends the ATMOCharacter class and fills in a definition of this variable

alt text

Then in the ATMOCharacter.cpp class, this variable is used, as shown in the BeginPlay function snippet shown here

     if (GetMesh())
     {
         UE_LOG(CustomGameModeLog, Warning, TEXT("ATMOCharacter: BeginPlay: GetMesh valid"))
     }
     else {
         UE_LOG(CustomGameModeLog, Warning, TEXT("ATMOCharacter: BeginPlay: GetMesh invalid"))
     }
 
     if (StandardCharAnim)
     {
         UE_LOG(CustomGameModeLog, Warning, TEXT("ATMOCharacter: BeginPlay: StandardCharAnim valid"))
     }
     else {
         UE_LOG(CustomGameModeLog, Warning, TEXT("ATMOCharacter: BeginPlay: StandardCharAnim invalid"))
     }
 
     GetMesh()->SetAnimInstanceClass(StandardCharAnim->GetAnimBlueprintGeneratedClass());

Now, when I play this in the editor, it claims the StandardCharAnim pointer is valid, whereas the packaged version claims it is not valid.

The BP_ThirdPersonCharacter class has been set as the Default Pawn, within the blueprinted gamemode class which has been set as the default gamemode from within the project settings.

The log file for the packaged game log file

The log file for the editor which performed the packaging operation packaginglog

Any suggestions would be greatly appreciated,

Thanks

Product Version: UE 4.18
Tags:
editor.jpg (12.1 kB)
tmo.log (16.2 kB)
tmo.log (533.2 kB)
more ▼

asked Oct 29 '17 at 12:31 AM in Packaging & Deployment

avatar image

MechaFarin
42 3 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

This is just a guess, but it is possible that in packaged version the engine first trying to create a default object BP_ThirdPersonCharacter without any settings. But you do have a problem in your code:

 GetMesh()->SetAnimInstanceClass(StandardCharAnim->GetAnimBlueprintGeneratedClass());

GetMesh() can return NULL and StandardCharAnim can be NULL

what you need is like this:

 if(GetMesh() && StandardCharAnim)
     GetMesh()->SetAnimInstanceClass(StandardCharAnim->GetAnimBlueprintGeneratedClass());

run it again without the game crash first and see if it helped.

more ▼

answered Oct 29 '17 at 03:25 AM

avatar image

Flash7
839 9 17 29

avatar image MechaFarin Oct 29 '17 at 10:03 AM

Thanks, yeah it seems checking for both causes the game not to crash immediately, and the character appeared in the world, however it seems the StandardCharAnim is still invalid even after the game has loaded, so the character walks around without any animations.

Edit: On further tests, it seems that meshes I added in the character blueprints have been correctly loaded, but upon adding another animation blueprint it seems neither are loading in correctly. So it is just the animation blueprints I add in the character blueprint that aren't loading

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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