Don't reset text IDs when restoring the old widget tree state post-compile to avoid cook determinism issues

This was likely a regression caused by 13773255, as prior to that change each UUserWidget managed its own persistent widget tree and would use PPF_DuplicateVerbatim when building it. That use of PPF_DuplicateVerbatim was lost when that code was removed in favor of building an archetype widget tree on the BPGC.

#jira UE-72591
#preflight 6447ddff773f23812daa7e75
#rb Patrick.Boutot, Dave.Jones2

[CL 25192074 by jamie dale in ue5-main branch]
This commit is contained in:
jamie dale
2023-04-25 19:23:02 -04:00
parent f9a39a41e6
commit a4a81dd099

View File

@@ -772,6 +772,7 @@ void FWidgetBlueprintCompilerContext::FinishCompilingClass(UClass* Class)
FObjectDuplicationParameters DupParams(WidgetBP->WidgetTree, BPGClass);
DupParams.DestName = DupParams.SourceObject->GetFName();
DupParams.FlagMask = RF_AllFlags & ~RF_DefaultSubObject;
DupParams.PortFlags |= PPF_DuplicateVerbatim; // Skip resetting text IDs
// if we are recompiling the BP on load, skip post load and defer it to the loading process
FUObjectSerializeContext* LinkerLoadingContext = nullptr;