You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Set RF_WasLoaded flag when saving packages to make sure this flag is consistently set on objects that exist on disk and in memory.
[CL 2312676 by Robert Manuszewski in Main branch]
This commit is contained in:
committed by
UnrealBot
parent
d60e92beca
commit
6ae3da9596
@@ -3607,6 +3607,22 @@ bool UPackage::SavePackage( UPackage* InOuter, UObject* Base, EObjectFlags TopLe
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mark exports and the package as RF_Loaded after they've been serialized
|
||||
// This is to ensue that newly created packages are properly marked as loaded (since they now exist on disk and
|
||||
// in memory in the exact same state).
|
||||
for (auto& Export : Linker->ExportMap)
|
||||
{
|
||||
if (Export.Object)
|
||||
{
|
||||
Export.Object->SetFlags(RF_WasLoaded);
|
||||
}
|
||||
}
|
||||
if (Linker->LinkerRoot)
|
||||
{
|
||||
// And finally set the flag on the package itself.
|
||||
Linker->LinkerRoot->SetFlags(RF_WasLoaded);
|
||||
}
|
||||
|
||||
// Clear dirty flag if desired
|
||||
if (!(SaveFlags & SAVE_KeepDirty))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user