Description

I noticed that if you cook with -allmaps instead of specifying each map like -map=map1+map2..., that it seems to cook all assets in your game's content folder, whether or not it's used in any maps or not.

This seems to also happen if you use the "package project" option in the editor, as that must use the -allmaps flag.

Expected results: Only assets that are referenced in some map are cooked. For example, if there is only one map in your project named "test", running the cooker with -map=test and -allmaps should cook exactly the same assets and produce exactly the same results in the cooked folder.

Related threads:
https://answers.unrealengine.com/questions/142794/why-does-the-editor-always-cook-all-resources-even.html
https://answers.unrealengine.com/questions/123668/does-the-content-cooker-cook-every-asset-even-if-i.html

Steps to Reproduce
  1. Create a new project in UE 4.6.1
  2. Import a new texture (don't use it in any level)
  3. Save the default blank map as "test"
  4. Close the editor
  5. Delete Engine/DerivedDataCache
  6. Delete Project/Saved/Cooked
  7. Run UE4Editor-Cmd.exe Path to .uproject file -run=cook -targetplatform=ios -map=test
    • Note that the unused texture that was added is NOT cooked
  8. Run UE4Editor-Cmd.exe Path to .uproject file -run=cook -targetplatform=ios -allmaps
    • Note that the unused texture IS cooked

Not specific to iOS, also happens with -targetplatform=WindowsNoEditor

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core - Cooker
Affects Versions4.6.14.74.8
Target Fix4.8
Fix Commit2430652
CreatedFeb 2, 2015
ResolvedFeb 4, 2015
UpdatedSep 16, 2019