Disallow TObjectPtr use on complete non-UObject derived types.
#rb devin.doucette
#preflight 63633a910c2e7c8f91d2e4e9
[CL 22966926 by Zousar Shaker in ue5-main branch]
#rb Per.Larsson
#jira UE-169114, FORT-533633
#preflight 6363a60b876630122aea6b16
- I needed to remove the 5.0 optimization where we tried to avoid loading the payload into memory so that it could be serialized to the undo stack. This logic would not work if the package were saved later and we were therefor unable to access the payload on disk.
- The landscape bug was not caused by this (as saving landscape actors wipes the undo stack) but caused by the inability to unload the payload properly. If an undo restore was run from a state where the payload was in memory to a state where the payload was not in memory, then that payload would not unload properly.So the bulkdata would end up with members for one payload, but the data of a different payload.
- We now always load the payload into memory if it is not there already and decompress into shared buffer format. In theory we could support two paths here one for FSharedBuffer when the payload is in memory and one for FCompressedBuffer when it is loaded from disk but it doesn't seem worth the effort. If it comes up as a problem in a profile then we'd be better off trying to add a way to create a non-compressed FCompressedBuffer from a FIoHash/FSharedBuffer pair rather than rehashing the FSharedBuffer.
- This also helps make the code clearer as we can remove the bPayloadInArchive value that we used to save.
- Once the undo stack transaction is completed we will try to unload the payload if we can. This is done if we are saving or loading and will only unload the payload if we know we can safely load from disk. Which means that the payload has not been edited from the version on disk and that the owning package has not been re-saved. This is to conform to the editor bulkdata policy that we should evict the payload from memory when ever possible to keep over all memory use down. It will however mean that repeated editing of an asset will cause repeated disk loads. This logic could be changed if it is profiled as an issue.
[CL 22959256 by paul chipchase in ue5-main branch]
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch
#preflight 63635997876630122adeab9f
#rb none
[CL 22958990 by henrik karlsson in ue5-main branch]
Moved GetTypeHash function to be hidden friend instead of put directly in global namespace.
Note that the function/operator needs to be fully inlined in the type or placed in the cpp. If the function is added as friend but then implemented outside the type then hidden friend optimization won't work.
This should improve compile time somewhat according to msvc devs.
#rb Steve.Robb
#preflight 6360b7052b5338aceb26471b
[CL 22889837 by henrik karlsson in ue5-main branch]
It wasn't finding any root objects in the actor package due to the "Object->GetOuter() == Package" test failing for external actors.
#jira
#preflight 63612013e271e75dea8c13e2
[FYI] Daniel.Lamb
#rb Rex.Hill
#rnx
[CL 22888819 by jamie dale in ue5-main branch]
[FYI] Robert.Manuszewski
Original CL Desc
-----------------------------------------------------------------
Adding FPackageName::GetContentPathForPackageRoot to be able to get the filesystem path (e.g. D:/Project/Engine/Content) of a given package root (e.g. /Engine/)
#rb Steve.Robb
#preflight 6360c64663608aee36d1a954
[CL 22888588 by edwin maynard in ue5-main branch]
* StructOnScope - Removed include of Package
* GeneratedCppInclude - Removed include of Package
Both of these files include Class.h which in turn include Package so no need to add backwards compatibility. Will add backwards compatibility in Class.h when Package.h is removed there (require a bit more work)
#preflight skipped
#rb none
[CL 22888526 by henrik karlsson in ue5-main branch]