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]
Add iostore chunk hashes to the asset registry during cook.
Remove old hashing code, which was extensive. This moves the async writes in to UE::Task from the old AsyncWorkSequence().
#rb Matt.Peters
#rb Jeff.Roberts
#preflight 624b24a5f73c316f68303946
[CL 19611812 by Dan Thompson in ue5-main branch]
#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 19439879 via CL 19444852 via CL 19445671 via CL 19445727
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)
[CL 19445893 by marc audy in ue5-main branch]
Subchunks are generated when having MaxChunkSize parameter set to a non-zero value in the project packaging properties. The problem was caused by the generated pakchunklayers.txt having information only for the main chunks, but not for subchunks. The package generator assumes that pakchunklayers.txt has the same number of lines as the generated pakchunklist.txt (storing a list of all chunks and subchunks).
This issue is a regression introduced in CL 7637286, which modified the code to output layer information for empty chunks.
#jira UE-146062
#rb dave.barrett
#preflight 6234adc40820efd0946b55eb
[CL 19437131 by Wojciech Krywult in ue5-main branch]
FArchive now holds a "CookData" blob that contains relevant information for cooking. The TargetPlatform has been moved to this structure, and it has a reference to a CookContext that can hold data generated during the cook that doesn't get serialized to the uasset (in this case, the asset registry tags).
#rb Matt.Peters
#preflight 62151bc4797dbbeb472af77d
#preflight 621011f6ff52bfecfc032b15
#preflight 62152777141b500e17eb24ef
[CL 19076066 by Dan Thompson in ue5-main branch]
#rb Josh.Adams
#preflight
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 19000716 via CL 19003250 via CL 19003309 via CL 19003327 via CL 19008122 via CL 19008726
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
[CL 19008802 by justin marcus in ue5-main branch]
Cooker: Fix tagging of assets in collections; AssetData tags now always require a non-empty value.
#preflight 62040121bf7362cd77f3c167
#rb Jamie.Dale
#rnx
[CL 18921179 by Matt Peters in ue5-main branch]
- Allow for skipping of saving the DevelopmentAssetREgistry.bin (useful when cooking DLC)
- Don't initialize the TemporaryState in AssetRegistry when cooking DLC
- Allow for some delaying of blocking on AsyncAR
#preflight 61fb43075a7645dc85e82ffa
#rb matt.peters,daniel.lamb
#ROBOMERGE-OWNER: josh.adams
#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 18843186 via CL 18844583 via CL 18844592 via CL 18844604 via CL 18847702 via CL 18848026
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18848072 by josh adams in ue5-main branch]
Added similar support to the package store manifest
Zen Store support will be added separately
Added some extra data to linker object resources to be used by the iostore package optimizer to properly support optional package chunks.
Multiple cooking outputs is used to support "optional objects" which are editor data package exports that would be put in separate iostore containers than the normal cooked game content.
#jira UE-129801
#rb Matt.Peters, CarlMagnus.Nordin
#preflight 61e5d3bb873f2ea48f48166c
#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 18639742 in //UE5/Release-5.0/... via CL 18639751 via CL 18639758
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)
[CL 18639762 by francis hurteau in ue5-main branch]
Split ExtraFlavor features in two to make them clearer.
Move FixupPackageDependenciesForChunks from SaveManifests into FinalizeChunkIDs since it needs to happen even when not saving manifests.
Set DiskSize to -1 for failed package saves in UpdateAssetRegistryPackageData, since that is part of updating assetdata for the package.
[CL 17628885 by Matt Peters in ue5-main branch]
Add the concept of pre-exploration of dependencies - searching assetregistry or target domain dependencies of the set of requested packages up front, to find all packages that will be cooked and allow us to do asynchronous and batch operations on them.
Convert FRequestCluster into an FPackageData container, holding packages in a substate of EPackageState::Request. This allows us to create a new RequestClusters when we encounter a package that was not found in the initial discovery.
Add hybriditerative mode for iterative cooks; this uses targetdomain keys to check for packages that exist from the previous cook, rather tracing the dependency graph to find all packages that transitively reference packages with modified guids.
Modify AssetRegistryGenerator to use a TMap of iteratively loaded packages that can be edied as packages cook, rather than using a const previous state; this supports hybrid iterative where we do not calculate the list of iterative packages until we encounter them in a request cluster.
#rb Zousar.Shaker
#rnx
[CL 17373295 by Matt Peters in ue5-main branch]