This is now controlled by FTextLocalizationManager::ShouldForceLoadGameLocalization, which will return true in the following cases:
* A cooked editor.
* An uncooked editor with the game localization preview enabled, or with the CVar Localization.ForceLoadGameLocalizationInEditor set to true.
This is queried to add the ELocalizationLoadFlags::ForceLocalizedGame flag when loading localization data, and also by FLocalizationTargetDescriptor::ShouldLoadLocalizationTarget when deciding whether to load a game localization target for a plugin (which also allows plugins to work with the game localization preview).
#rb eric.boucher
[CL 34460891 by jamie dale in ue5-main branch]
Add way to know the current enabled plugins for the target. This allows the application to only load the modules and plugins.
[REVIEW] [at]Will.Brown [at]Lewis.Farrell [at]Aidan.McDu
#rb aidan.mcdu, will.brown
[CL 34212830 by eric knapik in ue5-main branch]
This is passed through to the target receipt, and respected in FPluginManager.
#jira UE-214749
#rb Joe.Kirchoff
[CL 33811096 by zach brockway in ue5-main branch]
- Making use of unload configs in PluginManager, GameFeaturePlugins, and HotFixes
- To help with memory increase from the branch memory for unloadable configs, I added FConfigCacheIni::SafeUnload(BranchName), which can unload the memory usage by a branch, but then will on-demand reload the hierarchy if accessed
- Used SafeUnload to GGameplayTagsIni because that is read once and cached
- Various other minor optimizations, like not creating hundreds of empty configs in GConfig,
- Added "config memusage" (similar to configmem as it turns out)
- Removed some old deprecated code
- Added ability for editor to remember and write out comments in .ini files
- Changed commandline ini overrides to a dynamic layer (this is a work in progress - old method is still in there - it's tied to the ini.UseNewDynamicLayers cvar - old GFP code used the old way, etc, which i still support)
- Experimental support for runtime config change tracking, so saving out .ini files will have more context about how the user changed a config section (mostly important for arrays). This is not fully functional yet [WILL PROBABLY REMOVE]
- Experimental new config layer expansion system that uses FPaths::ConvertPath to find Restricted/Platform locations, instead of hardcoding
#rb David.Harvey
[CL 33489816 by josh adams in ue5-main branch]
Since the mount/unmount localization calls are now ref-counted, we can just always call them during GFP loading/unloading as they'll be a no-op if the localization data was already loaded by mounting (or anything else).
Also improved the logging when the localization data skips being loaded/unloaded due to an existing reference, so that we can see the ref-count in the log.
[FYI] Kelby.Gamble
#rnx
[CL 33204941 by jamie dale in ue5-main branch]
This allows different systems that need plugin localization to call MountExplicitlyLoadedPluginLocalizationData and UnmountExplicitlyLoadedPluginLocalizationData (in pairs), without needing to understand any other system that may have mounted localization for that plugin, and avoids the unmount calls from different systems fighting with each other.
#rb simon.orr
[CL 32929429 by jamie dale in ue5-main branch]
This leverages 4-bytes of padding in FDisplayStringEntry to store an ID (an int32 index generated via FTextLocalizationManager::GetLocalizationTargetPathId) that is used to tag each display string with the localization target that it belongs to, without increasing the size of DisplayStringLookupTable.
There is an additional LUT mapping each localization target ID to its text IDs to act as an accelerator for HandleLocalizationTargetsUnmounted, however this LUT only tracks text IDs associated with localization data loaded via HandleLocalizationTargetsMounted to minimize the memory impact of this additional tracking. Without this LUT HandleLocalizationTargetsUnmounted would need to spin the entire live table each time, which is not acceptable from a performance standpoint.
Now that HandleLocalizationTargetsUnmounted is implemented it's also been hooked into GFP deactivation, to mirror how HandleLocalizationTargetsMounted was hooked into GFP activation.
#rb anton.dunchev
[CL 32312744 by jamie dale in ue5-main branch]
This allows them to separate their mounting and content loading into two phases, such as allowing a GFP to mount the plugin when "registered" and defer mounting the localization data until "activating".
Note: Anything that was calling one of the MountExplicitlyLoadedPlugin functions to load a plugin, will now need to also call MountExplicitlyLoadedPluginLocalizationData if it wants to also mount the localization data.
#rb anton.dunchev, Leon.Huang
[CL 32029617 by jamie dale in ue5-main branch]
[Backout] - CL31459949
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL31443953
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
Phase 1 of the FConfigBranch changes:
Introduced FConfigBranch which maintains logic and data for each individual branch of GConfig (Engine, Game, Input, DeviceProfiles, etc), with static and dynamic layers
Introduced FConfigCommandStream which is how each layer is loaded, and Apply'd to an FConfigFile
Added a new way of making a "diff" of in-memory vs what's loaded, which creates an FConfigCommandStream that can be re-applied (more useful in Phase 2, see below)
Expectation is no visible differences from before this change, as it's mostly internal data structure changes
Phase 2 is where the functional changes will happen, with the dynamic layers being able to be removed at runtime, and the state of GConfig is maintained as expdected
The editor does maintain full state of where config values come from, so the "getini" command in the editor will show a lot more information now
Runtime will not keep any state, so unloading dynamic layers is not supported by default (running with -ConfigReplayMethod=1 or 2 will allow for it, but will use more memory)
#rb david.harvey
#jira UE-201472
[CL 31470013 by josh adams in ue5-main branch]