Why am I losing files when packaging? (4.15)

I recently upgraded to 4.15.

My game runs fine in editor. There’s a specific asset (I’ll call it switch). Several levels reference it. Migrating the level exports it (it’s in the reference list). When I package a build, it’s missing completely in the .pak file. What is the right way to figure out why this is?

[2017.02.21-23.16.11:941][  0]LogStreaming:Error: Couldn't find file for package /Game/Environment/Switch/Model/switch_handle_mesh requested by async loading code. NameToLoad: /Game/Environment/Switch/Model/switch_handle_mesh
[2017.02.21-23.16.11:941][  0]LogStreaming:Error: Couldn't find file for package /Game/Environment/Switch/Model/switch_base_mesh requested by async loading code. NameToLoad: /Game/Environment/Switch/Model/switch_base_mesh
[2017.02.21-23.16.11:943][  0]LogStreaming:Error: Couldn't find file for package /Game/Environment/Switch/Texture/switch_mat_inst requested by async loading code. NameToLoad: /Game/Environment/Switch/Texture/switch_mat_inst

Additional information:

  • checking the packaging setting to cook all content didn’t work
  • adding to the ‘asset directories to always cook’ didn’t work
  • the files DO show up in FileOpenOrder\cookeropenorder.log and editor…log
  • the files DO show up as being cooked in the log, just don’t show up if I do unrealpak -list on the generated pak file
  • references in the editor do show correctly

Hello DigitalMage,

Thank you for providing as much information as you did. After seeing the name “Switch” I went out on a limb and it ended up being fruitful. The reason this isn’t being included is because of your folder named “Switch”. Along with PS4 and XboxOne, this is a special folder name according to the editor due to console packages. Anything in this folder will be excluded from packages that are not for that platform. I’m going to enter a bug report for it, but I don’t expect the functionality to be changed. The more likely solution is to add a warning or error message when either packaging or creating a folder with this name to warn about this.

In short; You’ll need to rename that folder and then everything should work fine.

This makes me laugh, and cry at the same time. Thank you!

I am guessing “Switch” is a more common random folder name than Ps4 or Xbox

I ended up going with a Feature Request, since we would rather not change the functionality but adding a warning would be useful. You can find/track it here: UE-42317

Could you point me to where in the engine this happens? I’d like to make a list of directory names to avoid.

The formatting is messed up on Github so you may want to look at this file in Visual Studio, but the list is on line #80 - #119 in this file, under the “BinaryFolderName” section.

.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Developer/DesktopPlatform/Private/PlatformInfo.cpp#L80

Edit: This may not be a complete list, but it’s the ones that I know of.