Unknown Cook Failure

I’m currently trying to package my game, and I keep getting unknown build failure whenever I try to package the game. I successfully packaged my game yesterday, but after making a few changes today and confirming the game runs properly, cooking/packaging the game fails. Attached is the log from opening the editor, attempting to package, then closing the editor. Log File

It appears that most (all?) of the errors have to do with the struct I use to store high score entries, but I have no clue why that may be the case. I’ve opened the struct blueprint, and no issues are detected there. Additionally, the game runs fine using Play In Editor as well as launching as a standalone game through the editor.

Hopefully someone can shed some light on what the issue is and how to resolve it as I would love to be able to send my game out for playtesting soon!

Well, I managed to fix the issue. I noticed in the logs that one of my classes had a capitalization issue in the logs, which did not exist in the actual class’ name. Here a line from the log that demonstrates the issue:

[2016.06.16-23.39.32:310][795]MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.06.16-23.39.32:304][ 0]LogInit:Display: LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Blueprints/SaveGames/BP_HighScoresSaveGAme.BP_HighScoresSaveGame_C:GetHighestScoreEntryIndex.CallFunc_Array_Get_Item’. Unknown structure.

For whatever reason, the first section of that has the ‘a’ in Game capitalized, whilst the second part (and the blueprint name) is not. I renamed the blueprint and the issue went away. The only problem is I was making some changes with a struct mentioned in the log as well (duplicating it and replacing the original) in an attempt to fix it, which means I can’t be 100% sure that renaming the class that was misspelt in the logs fixed it. I did revert all the changes I did with the struct, however, so I find it likely that renaming the misspelt class was what actually fixed the issue. Hope this helps someone else that runs into this issue!

Edit (6/21/2016): I’ve run into this “Unknown Cook Error” issue several more times now, and it seems to occur when you create a BP struct, use the struct in at least one BP, and then later add members to the struct (removing members may also cause this, but in my cases, it was always adding). Every time the packaging/cooking process failed, I went to whatever struct(s) were added since the last cook I’d done, and simply added a letter to the end of the struct name, let the editor handle the renaming process, then removed the letter. So far, this has fixed the issue around 3 times without fail.

This saved an entire day’s worth of work for me, thank you. I ran into this once before and scrapped 3 hours of work to start again. I modified a struct again this morning and found out at the end of today the same build error. Like you said, I renamed my struct, let Unreal handle the renaming process, and rebuilt and it was fine!

Thanks for this.

Thank you! It really helps!

I just delete struct variable in the SaveGame and immediately create new with the same name - compile, save and all work