Adds a define UE_FNAME_OUTLINE_NUMBER.
Removes of FName, FMinimalName from memory image support. Adds of FMemoryImageName.
Removal of FMinimalName operator<<, all fields made private, size made variable.
All fields of FScriptName made private.
Added console commands for dumping numbered/unnumbered names and stats.
#rb johan.torp
#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19058026 via CL 19058611 via CL 19058656 via CL 19061727 via CL 19061740 via CL 19064047
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)
[CL 19066701 by robert millar in ue5-main branch]
#rb Andrew.Scheidecker
#preflight 620f3a108863746a104d6c36
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19047989 via CL 19048186 via CL 19048197 via CL 19048203 via CL 19049414
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)
[CL 19065767 by robert manuszewski in ue5-main branch]
BulkDataRegistry: Wait until the top-level EndLoadPackage, and wait until after OnEnginePostInit, before deleting bulkdatasize records. Deleting them sooner can make them be deleted before they're used by the EditorDomain if the EditorDomain's TrySavePackage triggers package loading and a recursive OnEndLoadPackage.
#rb Zousar.Shaker
#rnx
#preflight 620f00e7e8554a6f64f74d5a
[CL 19046732 by Matt Peters in ue5-main branch]
- Text format now includes import and export tables instead of discovering import while serializating exports. This is required to have enough information about objects with an override package that have their Outer in another package.
- UObject Json formatters now export import/export indices instead of relying on the objects full paths, which index into the exported import/export tables.
- Merged code to serialize UObject* and FObjectPtr in Json formatters to avoid code duplication.
#rb francis.hurteau, steve.robb
#preflight 61fd34030a43b689e1750d28
#rnx
#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 18978952 via CL 18980785 via CL 18981531 via CL 18981661 via CL 18992713 via CL 18993052
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
[CL 18997360 by jeanfrancois dube in ue5-main branch]
#rb Per.Larsson, Devin.Doucette
#jira UE-133497
#rnx
#preflight 61f835491c5ac5523462810a
- A lot of files have been touched but most of this is changing FPayload::IsValid to !FIoHash::IsZero, the main changes are in EditorBulkData/EditorBulkDataTests
- The only difference between FPayloadId and FIoHash is that the former considered the hash of an invalid or empty buffer to be 'invalid' too where as FIoHash would return a valid hash
-- To keep behaviour the same, we only hash payloads in EditorBulkData using a utility method ::HashBuffer which will not hash empty or invalid payloads and return a default FIoHash instead.
-- Unit tests have been extended to prove that the behaviour has not changed.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18806362 in //UE5/Release-5.0/... via CL 18808527 via CL 18821790
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18822154 by paul chipchase in ue5-main branch]
FIoDispatcher::IsInitialized() will now return true if it exists (which is almost always)
Renamed FArchive::IsUsingEventDrivenLoader() to IsLoadingFromCookedPackage and based it on the PKG_Cooked flag
#rnx
#rb pj.kack
#preflight 61f3ab6f74510448a6740570
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18769198 in //UE5/Release-5.0/... via CL 18769204 via CL 18769272
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18769277 by carlmagnus nordin in ue5-main branch]
#rb PJ.Kack
#rnx
#jira UE-139708
#preflight 61eaaedfc92021e535b6d1e0
- The goal is to show a clear separation between the bulkdata object and the virtualization system.
- NOTE that all of these classes were added during 5.0 development so we are just renaming and moving them, no deprecation paths.
- Renamed FVirtualizedUntypedBulkData to FEditorBulkData
-- Also removed the derived templated types, they were never actually used
- Renamed FVirtualizedBulkDataReader to FEditorBulkDataReader
- Renamed FVirtualizedBulkDataWriter to FEditorBulkDataWriter
- Moved the renamed classes to the UE::Serialization namespace from UE::Virtualization
- Renamed the files of the renamed classes where required.
- Replaced use of LogVirtualization with LogSerialization.
- Renamed defines prefixed with VBD_* to UE_ and make sure they are undefed by the end of the cpp
- Edited unit tests to show up under "System.CoreUObject.Serialization.EditorBulkData.*"
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18688778 in //UE5/Release-5.0/... via CL 18688787 via CL 18688810
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18688823 by paul chipchase in ue5-main branch]
Add support for importing uncooked source packages from cooked packages
#rnx
#jira UE-136265, FORT-426538
#rb pj.kack
#preflight 61e6ff6a3778a195debba826
#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18655480 via CL 18664834 via CL 18665656 via CL 18665916 via CL 18667722 via CL 18667764 via CL 18668174
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521)
[CL 18668352 by marc audy in ue5-main branch]
#rb CarlMagnus.Nordin, pj.kack
#rnx
#jira UE-133429
#preflight 61e7c020b875abaf33179ccc
### Token Removal
- Now that we support the IoStore in the editor there is no reason to keep the bulkdata streaming token as both the editor and runtime systems can use the same code paths.
- Existing use of USE_BULKDATA_STREAMING_TOKEN will now give deprecation warnings however code should continue to work as long as STREAMINGTOKEN_PARAM was correctly used.
- ::CreateStreamingToken has been removed from the bulkdata api, but any calls to this should've been wrapped with #if USE_BULKDATA_STREAMING_TOKEN
### API Fixes
- We can remove all code that relied on USE_BULKDATA_STREAMING_TOKEN being == 1
- LANDSCAPE_LOD_STREAMING_USE_TOKEN required USE_BULKDATA_STREAMING_TOKEN to be enabled, so we can now assume that it is always 0 and remove the associated code paths.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18656055 in //UE5/Release-5.0/... via CL 18656061 via CL 18656063
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)
[CL 18656065 by paul chipchase in ue5-main branch]
#rb PJ.Kack
#jira UE-139348
#rnx
#preflight 61e6742a3778a195dea02199
### PackageTrailer
- We no longer store the access mode for all payloads in the trailer. Instead each payload entry in the lookup table will store the access mode for that specific payload. This allow us to store many payloads of different access types in the same trailer.
- Note that this format change is currently versioned (going from 0 to 1) and is compatible with older version.
-- To allow this, the << operator has been removed from FLookupTableEntry and replaced with a ::Serialize method that takes the version of the package trailer header as an input so that it can run it's own versioning checks.
- When loading trailers with version 0 we apply the access mode to all non virtualized payload entries in the lookup table to reproduce the single access mode for the entire trailer.
- A FPackageTrailerBuilder can now be created directly from an existing FPackageTrailer that will reference all of the trailers local payloads via the new static method ::CreateReferenceToTrailer
- Removed FPackageTrailer::TrySave as it is no longer used when creating a trailer for the editor domain.
- Renamed FPackageTrailer::LoadPayload to ::LoadLocalPayload to make it clear the type of payload that can be loaded.
-- Someday the package trailer should be able to load payloads of any type.
### VirtualizedBulkData Serialization Changes
- We now record if the bulkdata's payload is stored in a package trailer or not via the 'StoredInPackageTrailer' flag, which makes it easier to identify critical errors in serialization (the trailer is missing for example)
-- Storing this info as a flag is now possible as the design for the trailer has changed and a fully virtualized package will still contain a trailer.
- We now only write out OffsetInFile if the payload is not stored in a FPackageTrailer, if the bulkdata object does use a package trailer via the new flag then we take the offset from the trailer instead.
- We also no longer write out a path when saving a payload as referenced to the editor domain, it is assumed that the trailer will know where the workspace domain data is (namely the owning package path)
-- Due to the 'StoredInPackageTrailer' only being added now, this means that packages already saved with a package trailer will work with this code logic as those packages will have serialized the offsets to disk, but won't have the new flag and so will serialize the offsets when loading until re-saved. (worth noting that nobody should encounter this as the package trailer system is disabled by default)
- The loading code is a lot easier to read now and a lot of the branches have been removed although we still have a few extra checks for older formats that might have been saved during development.
- When loading the only real consideration we have is if the payload is in the trailer or not.
- Future Work:
-- If we are not writing to the trailer then we use the legacy serialization system which appends the bulkdata to the end of the package. This is used in two cases, 1) When the package trailer system is disabled 2) If the payload is updated in postload and we are writing out the package to the editor domain as the package trailer does not support writing out local payloads outside of the workspace domain at the moment. The trailer should handle this itself and not rely on the legacy serialization system so that we can remove it.
-- Note that if a payload is stored by reference, we are not adding it explicitly to the payload trailer and we are relying on the trailer builder already containing the reference information when it is created in SavePackage. We do however run an assert to ensure that the reference does exist in the trailer but it might be worth revisiting this.
### VirtualizedBulkData Misc
- The member 'PackageSegment' is now initialized in the constructor to EPackageSegment::Header.
- Moved ::GetPackagePathFromOwner from being a method to a utility function as it accessed no members.
- Validating the payload for saving during serialization has been moved from ::Serialize to it's own method ::TryPayloadValidationForSaving.
### PackageSubmissionChecks
- Added an error message if we detect referenced payloads in a trailer we are trying to virtualize as this condition should never occur. If we encounter it, we give a user facing error message and fail the submit process. It might be worth demoting this to an assert instead as it is not an error the user is expected to see.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18637906 in //UE5/Release-5.0/... via CL 18637926 via CL 18637929
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)
[CL 18637932 by paul chipchase in ue5-main branch]
#rb PJ.Kack
#jira UE-138715
#rnx
#preflight 61de7c826a076ddb53d85e76
- We now only validate the payloads contents when ::GetDataInternal is called. This prevents duplicate log messages being raised.
-- Duplicate calls to IsValid have been removed.
-- This also means we don't need ::GetCorruptedPayloadErrorMsgForLoad anymore as it is only used in a single place.
- Renamed ::IsValid to ::IsDataValid to make it clearer that we are checking the contents of the payload.
-- The utility no longer checks if the payload fails to load (size should be >0 but the payload is null) but only checks if the payload is corrupted or does not match the expected content hash.
--- This is because the payload failing to load is an error, but it is something that we expect to see happen on occasion, perhaps when the network is flaky etc. However the wrong or corrupted data being loaded is not expected and so needs to be reported as it's own specific error.
--- Splitting these types of failures up, should allow us to consider enabling VBD_CORRUPTED_PAYLOAD_IS_FATAL again. Although now we prevent the saving of packages with corrupted payloads we probably don't need to treat a corrupted payload as a reason to terminate the editor.
- Removed warning from FVirtualizedUntypedBulkData::PullData when the payload failed to pull as IVirtualizationSystem will have already logged an error and the warning was incorrect as it was displaying the payload identifier as the bulkdata guid.
- VBD_CORRUPTED_DATA_SEVERITY is now set as an Error if VBD_CORRUPTED_PAYLOAD_IS_FATAL is disabled.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18581869 in //UE5/Release-5.0/... via CL 18581873 via CL 18581874
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)
[CL 18581878 by paul chipchase in ue5-main branch]
#rb Matt.Peters
#rnx
#jira UE-136891
#preflight 61dbf8eeaf44b43628343f00
- Now when saving a package to the editor domain we will load the existing package trailer (if one exists) from the workspace domain and then create a new trailer that references those payloads rather than store them locally.
- VirtualizedBulkData serialization is still overly complicated and this code adds more branches there. If we stopped the VBD objects from serializing their offsets at all and rely entirely on the package trailer to know where the payloads are stored then we could simplify this, but that requires the package trailer system to be turned on so will be done as future work.
### VirtualizedBulkData
- Split bAllowVirtualizationOnSave into a second variable. The original now controls if we push the payload on save (off by default and not something we are likely to keep) and the new variable (bForceRehydrationOnSave) controls if we must pull payloads when the package is saved (on by default) which will be moved to a config value once properly supported.
-- The split was done to make the logic in ::Serialize clearer
- We now correctly Register/Unregister the bulkdata object when ::DetachFromDisk is called. This prevents the bulkdata registry from trying to access the workspace domain file after it has been invalidated.
-- In addition we now attach to the FLinkerLoader's cachable archive (if there is one) when using the ::IsReferencingByPackagePath branch of serialization.
- When saving the bulkdata as part of an editor domain save we can keep the virtualization flag as we don't have to worry about the workspace domain file changing without the editor domain version being rebuilt anyway.
### SavePackage
- If the package is part of a procedural save and not a cook we will try to load the trailer from the workspace domain and then convert it to a referenced trailer (which contains the correct info to load the payload from the workspace domain package file but does not contain the payloads itself) which is then appended to the package.
### PackageTrailer
- Removed the fatal error if a project has both the editor domain and the package trailer system enabled.
- Added a method ::CreateReference that creates a trailer that references the payloads in an existing trailer.
- Added a method ::TrySave, allowing direct writing of a trailer to an archive.
-- Now that we have TrySave and TryLoad it probably makes sense to add the << operator as the public interface and move the methods to be private.
- FFooter and FHeader have their own serialization overloads now rather than relying on the higher level structures to do the work.
- When building a new trailer we now create a new FPackageTrailer structure and then write that out in one go, rather than writing each value as it is calculated to make the code easier to read.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18557778 in //UE5/Release-5.0/... via CL 18557792
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18557812 by paul chipchase in ue5-release-engine-test branch]
A payload was conceptually a value with an ID. That has been formalized by removing the ID from the payload and having separate FValue and FValueId types. This separation cleans up the API in a few areas, and provides a more natural path to providing a basic key/value API.
#rb Zousar.Shaker
#rnx
#preflight 61d704c04c252480ca284d61
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18531844 in //UE5/Release-5.0/... via CL 18531856
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18531864 by devin doucette in ue5-release-engine-test branch]
#rb PJ.Kack
#rnx
#preflight 61b79447f807c623046e91a5
### FPackageTrailer
- FPackageTrailerBuilder::Create now renamed to ::CreateFromTrailer to make it a bit clearer.
- Added 'AccessMode' to the file format documentation.
- FPackageTrailerBuilder no longer tracks infomation about the trailer once it is written to disk. Instead when writing to disk we will create a valid FPackageTrailer as part of the serialization. This will be passed to callbacks and can be queried by virtualized bulkdata.
-- Since the builder no longer tracks data after creating the trailer, we can remove checks from methods like ::AddPayload.
-- Removed FPackageTrailerBuilder::FindPayloadOffset and added a version to FPackageTrailer instead.
- Changed a number of methods to take FPayloadId by reference rather than by value.
### VirtualizedBulkData
- Replaced areas of code responsible for updating previously written out values with the utility function ::UpdateArchiveData to help with code readability.
### Misc
- FLinkerSave no longer creates a FPackageTrailerBuilder by default, instead one should be added to the FLinkerSave if we want to build a trailer for the package being saved.
- FLinkerLoad now considers 0 to be an invalid value for PayloadTocOffset in addition to INDEX_NONE, so we now check if the value is > than 0. This is because when FPackageFileSummary objects are created, all members are set to zero and we know that a FPackageTrailer cannot be 0 and the rest of the package still exist so we can safely consider it invalid.
- SavePackage/SavePackage2 now create the FPackageTrailerBuilder when the linker is created if the package trailer feature is enabled.
-- We now always call BuildAndWriteTrailer and then only skip the creation of the trailer if the builder is missing or conditions are not met.
-- If we do not write out the trailer, we make sure to set PayloadTocOffset in the FPackageFileSummary to INDEX_NONE as it is clearer than leaving it at the default 0.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18453324 in //UE5/Release-5.0/... via CL 18453328
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)
[CL 18453333 by paul chipchase in ue5-release-engine-test branch]
Also fix two other minor issues: Make Move constructor available for FIntVirtualizedBulkData, and make Register public so UObjects can notify the registry that they own a BulkData.
#rb Paul.Chipchase
#rnx
#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18431598 in //UE5/Release-5.0/... via CL 18435352
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18435594 by matt peters in ue5-release-engine-test branch]
#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18427792 in //UE5/Release-5.0/... via CL 18427811
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18427827 by marc audy in ue5-release-engine-test branch]
#rb PJ.Kack
#rnx
#preflight 61a8d6d8a7179bfa550218af
- This is an experimental feature being used during testing and development, it is not intended to be used by a shippable project.
-- The code is all wrapped by a single define, UE_ENABLE_VIRTUALIZATION_TOGGLE, making it easy to disable and remove
-- The actual method called on bulkdata, ::SetVirtualizationOptOut is being submitted already deprecated to prevent it's accidental use.
- The use case is to allow projects to opt out of virtualizing static meshes as they are more fragile (i.e. hard crashes) when their payloads cannot be accessed.
- Even when ::SetVirtualizationOptOut is called the feature will not work unless [Core.System.Experimental]AllowVirtualizationOptOut=True is set in the config file. This allows projects to opt into this.
- When a bulkdata is opting out, we simply send the payload to be stored at the end of the package like we used to, rather than send it to the package trailer. This way we do not need to store any additional state in the trailer to track if a payload is allowed to be virtualized or not. Since this feature is throw away I did not want to make any data format changes.
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18352158 in //UE5/Release-5.0/... via CL 18352163
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18352180 by paul chipchase in ue5-release-engine-test branch]
FArchiveReplaceObjectRefBase no longer tracks replaced references by default. GetReferencedResources will ensure if archiver was not run with TrackReplacedReferences.
#rb Michael.Noland
#preflight 61a7c89c1a368fd6038f4b79
#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18343619 in //UE5/Release-5.0/... via CL 18343639
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18343679 by marc audy in ue5-release-engine-test branch]