Description

When cooking world partition maps, it automatically writes out several maps in a "Generated" folder below the location of the map in the editor. In the repro above, this will create maps such as /Game/Maps/NewMap/Generated/258CF4B3C3EQ3YYV8GYMXMRA0. These are temporary maps that should never be loaded directly. However, because they are inside the same folder as the editor map, the AssetManager will scan and try to register them as PrimaryAssets. The Lyra repro works because it is already set up to scan /Game/Maps for primary assets.

Prior to 5.4 this would register those maps as primary assets which wasted memory and confused the asset manager. They could not be loaded properly. In 5.4 (CL 29430228 on Main) the generated maps were changed to not register as primary assets which fixed the problem. However, if they are set up to scan in those folders it will cause a warning in cooked builds as described in the repro steps.

Steps to Reproduce
  1. Load Lyra in the editor (or another game set up to cook world partition maps
  2. Create a new Maps folder inside the Content folder 
  3. Create a new Open World level, save it inside the Maps folder so the full package is called /Game/Maps/NewMap
  4. Use the Platform menu to package a Development build on Windows (or another platform, it is not platform specific)
  5. Once packaging succeeds, run the packaged build
  6. From the menu use ` to open the console and enter "open /Game/Maps/NewMap" to load the map and verify that it cooked properly
  7. Open the log file generated by the cooked game, it will be in a Saved/Logs directory where you choose to package the build

Expected behavior:

No warnings starting with LogAssetManager (ignore any other warnings as they are irrelevant)

Broken behavior:

If this is still broken you will see several warnings in the log similar to this:

LogAssetManager: Warning: Ignoring primary asset NewMap - PrimaryAssetType Map - invalid primary asset ID
LogAssetManager: Warning: Ignoring primary asset NewMap - PrimaryAssetType Map - invalid primary asset ID
LogAssetManager: Warning: Ignoring primary asset NewMap - PrimaryAssetType Map - invalid primary asset ID

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-216073 in the post.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core - Cooker
Affects Versions5.45.5
Target Fix5.5
Fix Commit34573294
CreatedMay 29, 2024
ResolvedJun 21, 2024
UpdatedJul 20, 2024
View Jira Issue