Description

Request from Licensee:

When launch Launching in the editor, it seems that asset registries of platforms other than those specified in Launch are also generated.

 

 LogAssetRegistryGenerator: Starting FixupPackageDependenciesForChunks ...
 LogStats: ... FixupPackageDependenciesForChunks complete. - 0.000 s
 LogAssetRegistryGenerator: Display: Saving asset registry.
 LogAssetRegistryGenerator: Display: Generated asset registry num assets 6593, size is 13102.10 kb
 LogAssetRegistryGenerator: Display: Done saving asset registry.
 LogAssetRegistryGenerator: Starting FixupPackageDependenciesForChunks ...
 LogStats: ... FixupPackageDependenciesForChunks complete. - 0.000 s
 LogAssetRegistryGenerator: Display: Saving asset registry.
 LogAssetRegistryGenerator: Display: Generated asset registry num assets 6593, size is 13102.10 kb
 LogAssetRegistryGenerator: Display: Done saving asset registry.
 LogAssetRegistryGenerator: Starting FixupPackageDependenciesForChunks ...
 LogStats: ... FixupPackageDependenciesForChunks complete. - 0.000 s
 LogAssetRegistryGenerator: Display: Saving asset registry.
 LogAssetRegistryGenerator: Display: Generated asset registry num assets 6593, size is 13102.10 kb
 LogAssetRegistryGenerator: Display: Done saving asset registry.
 LogAssetRegistryGenerator: Starting FixupPackageDependenciesForChunks ...
 LogStats: ... FixupPackageDependenciesForChunks complete. - 0.000 s
 LogAssetRegistryGenerator: Display: Saving asset registry.
 LogAssetRegistryGenerator: Display: Generated asset registry num assets 6593, size is 13102.10 kb
 LogAssetRegistryGenerator: Display: Done saving asset registry.

Since this is not an insignificant amount of work if the number of assets of the game is large, might be better to limit it to the platform being launched on.

 

If you "Cook in the Editor" via the experimental editor options, launching in another process only saves the registry for the specified platform in UCookOnTheFlyServer::GenerateAssetRegistry().

If in the SavingAssetRegistry loop inside of UCookOnTheFlyServer::CookByTheBookFinished() we were to add code like the following to early out if the platform is not the one being cooked, seems like it should work:

 

SCOPE_TIMER(SavingAssetRegistry);
 for (TPair<FName, FAssetRegistryGenerator*>& Pair : RegistryGenerators)
 {
 TArray<FName> CookedPackagesFilenames;
 TArray<FName> IgnorePackageFilenames;
const FName& PlatformName = Pair.Key;
 FAssetRegistryGenerator& Generator = *Pair.Value;
if (!CookByTheBookOptions->TargetPlatformNames.Contains(PlatformName))
 {
 continue;
 }
//...

 

Originally requested here:

Launchで指定したプラットフォーム以外のアセットレジストリも生成されます

 

Have Comments or More Details?

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

0
Login to Vote

Fixed
Fix Commit11029036
Main Commit11258477
CreatedJan 18, 2018
ResolvedJan 21, 2020
UpdatedAug 21, 2021
View Jira Issue