Description

Asynchronously loading a level that has one or more Actors using the "Async Load Primary Asset" node will enable dirty grug for that level asset.

The cause is a modified code(CL-3764602) for the [Link Removed].

in AsyncLoading.cpp

#if WITH_EDITOR
// In editor builds, call the asset load callback. This happens in both editor and standalone to match EndLoad
for (const FWeakObjectPtr& WeakAsset : LoadedAssets)
{
// It may have been unloaded/marked pending kill since being added, ignore those cases
if (UObject* LoadedAsset = WeakAsset.Get())
{
FCoreUObjectDelegates::OnAssetLoaded.Broadcast(LoadedAsset);
}
}
LoadedAssets.Reset();
#endif

This code calls OnAssetLoaded for the level asset, and some functions of the actor of that level (AActor :: RerunConstructionScripts, AActor :: DestroyConstructedComponents (), UActorComponent :: Rename) are called. This causes dirtyflag of the level asset to be effective.

Probably, if we judge whether LoadedAsset is level or not with the above code, I think that this issue will be fixed.

 

Steps to Reproduce
  1. Make Two level ( LV_A, LV_B )
  2. Add "Async Load Primary Asset" node to BeginPlay event node of LV_A's level BP
  3. Set Primary Asset pin of  "Async Load Primary Asset" node to LV_B
  4. Add actor to LV_B
  5. PIE
  6. Dirty flag of LV_B is enable

Have Comments or More Details?

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

3
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.19.24.20
Target Fix4.21
Fix Commit4273861
Main Commit4289353
Release Commit4399518
CreatedJul 26, 2018
ResolvedAug 9, 2018
UpdatedOct 2, 2018
View Jira Issue