Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch
#preflight 63635997876630122adeab9f
#rb none
[CL 22958990 by henrik karlsson 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]
UObject statics: Improve the feedback in the compile error for static reflected UObject methods when the function prototype is incorrect.
UObject delegates: Add an OnObjectConstructed delegate, and add the Object being PostLoaded to the PackageAccessTracking UE_TRACK_REFERENCING_PACKAGE_SCOPED, so we can give a warning when objects are constructed during PostLoad that have not been declared via DeclareConstructedClasses.
EditorDomain: Improve performance of CalculatePackageDigest by precomputing the inclusive schema for every class instead of needing to calculate it each time that class is used.
EditorDomain: Fix bug in UObject::DeclareCustomVersions that was causing array properties not to be parsed.
EditorDomainUtils: change ClassDigests to identify ClassPaths using TopLevelAssetPath to match the changes made by ANY_PACKAGE.
CoreRedirects: Add FCoreRedirectObjectName costructor from FTopLevelAssetPath to reduce boilerplate for detecting class redirects.
#rb Zousar.Shaker
#rnx
#preflight 6345c695e94850122406b944
[CL 22469685 by Matt Peters in ue5-main branch]
Given a root object, this function will call the callback every time it encounters a reference in the root object (including all inlined/instanced UObjects. The returned references will be in an easily understood debugging format so that they're easy to understand the context.
For example, Actions[2](GameFeatureAction_Activities)->ObjectActivitiesInfo[0].TargetReference
Where TargetReference was one of the listed PackagesReferenced. The point of this function is to assist in the reporting of references between objects you need to show the developer.
[CL 22366197 by nick darnell in ue5-main branch]
These FNames can take 30mb+ of memory in a large project.
Refactor FSoftObjectPath to store a FTopLevelAssetPath instead of an FName for the top level asset part.
Refactor FAssetData to infer the object path from the PackageName and AssetName fields and an editor-only field called OptionalOuterPath for external actors which are non-top-level assets.
Refactor FAssetBundleData to only store top level asset references.
Increase EUnrealEngineObjectUE5Version for FSoftObjectPath invalidation.
Increase FAssetRegistryVersion to invalidate serialization of FAssetData and FAssetBundleData - asset registry serialization does not see EUnrealEngineObjectUE5Version.
Replace TMap in Asset Registry with TSet to avoid duplicating the key fields.
Remove object path FName fields from native blueprint make/break functions for FARFilter - those pins will be orphaned.
Refactor redirect collector to use soft object paths rather than FNames.
UE_DEPRECATED markers have been commented out in this change to allow separate submission of deprecation fixups across the engine.
#jira UE-161932
#rb matt.peters,francis.hurteau,ben.zeigler
#lockdown marc.audy
#preflight
[CL 21826272 by Robert Millar in ue5-main branch]
ITransactionObjectAnnotation has two new functions; SupportsAdditionalObjectChanges to state whether the annotation type supports object diffing (default false), and ComputeAdditionalObjectChanges to actually compute the diff against another annotation (which must be of the same type).
This allows transaction annotations that entirely manage other objects (such as FActorTransactionAnnotation which manages the SCS and UCS components on an actor) to produce meaningful change information that can be passed to the PostTransacted function of the managed object (tagged with ETransactionObjectChangeCreatedBy::TransactionAnnotation).
Note: It is not safe to cache the result of a ComputeAdditionalObjectChanges outside of the current transaction, as objects managed by a transaction annotation can have volatile names. This means that the transaction annotation itself will have ComputeAdditionalObjectChanges called on it during undo/redo as well as during transaction snapshot/finalization, and means that the transaction annotation must have its own way of pairing old->new objects over time.
#preflight 63062421516bef57ffe8bafe
#rb Rex.Hill, Bart.Hawthorne, Francis.Hurteau, Jason.Walter
[CL 21572764 by robomerge in ue5-main branch]
The class part of an ExportText path now also starts with a /, so the code that was trimming it off during SetPath was no longer running.
#jira
#preflight 62cf05bb7822772758de6914
#rb Matt.Peters, Robert.Manuszewski
#rnx
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 21078121 via CL 21080081 via CL 21080570 via CL 21080909
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
[CL 21083083 by jamie dale in ue5-main branch]
The constructor for FLongPackagePathsSingleton would take a write lock. This would block however as there are Get() call sites where a read lock is already being held. But as the singleton construction is thread-safe there is no need to take a write lock in constructor and it has been removed. To mitigate the error returning in the future the Get() is called before taking any read locks. The lock was renamed and moved into FLongPackagePathsSingleton instead of a global.
#rb cm
#preflight 62be97728d5e67875907ebcf
[CL 20911412 by Martin Ridgers in ue5-main branch]
[REVIEW] [at]Matt.Peters
#ROBOMERGE-AUTHOR: james.hopkin
#ROBOMERGE-SOURCE: CL 20772922 via CL 20772982 via CL 20772993 via CL 20772999 via CL 20773005
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v970-20704180)
[CL 20774449 by james hopkin in ue5-main branch]
This change consists of multiple changes:
Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values
AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes
Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names
#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32
#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786
#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20448496 by robert manuszewski in ue5-main branch]
Move the existing DeclareCustomVersions function which was declared as a virtual UObject function into a static UObject function using this method.
#rb Steve.Robb
#rnx
#preflight 62827303046b81bf93c15ef2
[CL 20226876 by Matt Peters in ue5-main branch]
Assertion failed: GObjUnhashUnreachableIsInProgress || GObjIncrementalPurgeIsInProgress || !IsGarbageCollecting() [File:.\Runtime/CoreUObject/Private/Misc/GCObjectReferencer.cpp]
With the new default lock behavior it should be allowed to add and remove references outside of the reachability analysis scope.
With the legacy lock behavior checking IsGarbageCollectingAndLockingUObjectHashTables() means the same thing as IsGarbageCollecting().
When the legacy lock behavior is deleted this check can be simplified to check(!IsGarbageCollectingAndLockingUObjectHashTables()).
#jira UE-150654
#rb francis.hurteau, danny.couture, robert.millar
#rnx
#ROBOMERGE-OWNER: pj.kack
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-COMMAND: _robomerge[bot4] UE5-MAIN
#ROBOMERGE-SOURCE: CL 20038707 via CL 20038717 via CL 20038721 via CL 20038724 via CL 20038728
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 20038836 by pj kack in ue5-main branch]
#jira UE-145643
#rb ryan.gerleve
#ROBOMERGE-AUTHOR: brian.bekich
#ROBOMERGE-SOURCE: CL 19785177 via CL 19785195 via CL 19792886 via CL 19793235 via CL 19793656
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)
[CL 19809617 by brian bekich in ue5-main branch]