Download

Documentation Error: PostLoad

Hey, I believe that the current documentation for PostLoad is incorrect, it states under its remarks section: “Do any object-specific cleanup required immediately after loading an object, and immediately after any undo/redo.” However, I don’t believe that PostLoad is ever called after a Undo/Redo operation, I’ve tested this with both logic and logging and I don’t believe that this documentation is correct. Perhaps this section of the documentation is very old and the undo/redo call was moved from PostLoad to PostEditChangeProperty?

If I’m incorrect in something I would appreciate if someone could clear up this misunderstanding, thank you.

Hi Cidubic,

I’ve reported this to our documentation team as JIRA [UEDOC-1411]. Thanks for pointing this out.

Robert.Manuszewski gave this example callstack showing PostLoad being called during duplication:

> UE4Editor-CoreUObject-Win64-Debug.dll!UObject::PostLoad() Line 261 C++
UE4Editor-CoreUObject-Win64-Debug.dll!UObject::ConditionalPostLoad() Line 686 C++
UE4Editor-CoreUObject-Win64-Debug.dll!StaticDuplicateObjectEx(FObjectDuplicationParameters & Parameters) Line 1587 C++
UE4Editor-CoreUObject-Win64-Debug.dll!StaticDuplicateObject(const UObject * SourceObject, UObject * DestOuter, const wchar_t * DestName, EObjectFlags FlagMask, UClass * DestClass, EDuplicateForPie DuplicateForPIE) Line 1447 C++