Make sure the package localization cache is up to date before going in the GIsSavingPackage block in Save2

#rb Jamie.Dale
#jira UE-101268

[CL 14680029 by Francis Hurteau in ue5-main branch]
This commit is contained in:
Francis Hurteau
2020-11-06 15:51:51 -04:00
parent 07521a81f9
commit 83febb3b86
@@ -8,6 +8,7 @@
#include "Blueprint/BlueprintSupport.h"
#include "HAL/FileManager.h"
#include "Internationalization/TextPackageNamespaceUtil.h"
#include "Internationalization/PackageLocalizationManager.h"
#include "IO/IoDispatcher.h"
#include "Misc/AssetRegistryInterface.h"
#include "Misc/ConfigCacheIni.h"
@@ -204,6 +205,9 @@ FORCEINLINE void EnsurePackageLocalization(UPackage* InPackage)
TextNamespaceUtil::EnsurePackageNamespace(InPackage);
}
#endif // USE_STABLE_LOCALIZATION_KEYS
// Also make sure the localization cache is up to date, since updating it during the GIsSavingPackage won't allow object resolving
FPackageLocalizationManager::Get().ConditionalUpdateCache();
}
ESavePackageResult RoutePresave(FSaveContext& SaveContext)