You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This is controlled by the macro "WITH_CASE_PRESERVING_NAME", which is currently just set to "WITH_EDITORONLY_DATA" so that it works in editor builds (and UHT).
Added an extra NAME_INDEX entry to FName to store a second string table index for a case-variant string. The previous Index value (now called ComparisonIndex) is still used for comparison purposes (as FNames are still case-insensitive).
The Init process for an FName now works like this:
1) It will find or add a string table entry for the given string (not matching case) - this entry index is stored in ComparisonIndex.
2) It will then compare the string table entry string against the given string (matching case) to see if it also needs to add a case-variant entry for the FName.
3) If it does, it finds or adds a second string table entry (matching case) for the string - this entry index is stored in DisplayIndex.
Hard-coded FNames (those listed in UnrealNames.h) do not support case-variants (due to existing network replication rules for hard-coded FNames), so they skip steps 2 and 3.
I added FMinimalName, which is the same size as FName was previously. This shouldn't really be used (and as such, is deliberately awkward to make/use) as it loses the case-preserving behaviour of FName, however it was required for some things (like stats) that had a hard-coded upper limit on FName size.
I added FScriptName, which always contains the extra display index (even when WITH_CASE_PRESERVING_NAME is disabled). This is used by Blueprint bytecode, as the types used by Blueprint bytecode must be a consistent size between all build configurations.
Other changes:
- Fixed up any places that were passing an Index into the FName constructor which was supposed to take an EName.
- Some places were doing this to make the number unique when replicating an object, but this was losing the case-variant information, so I had to fix them.
- FName will now assert if the EName constructor is used with an value outside the range of hard-coded FNames.
- Ensured that assets, actors, and blueprint components could all be renamed in a way that only changed their case, and that these changes were correctly persisted.
- Added FLinkerNamePairKeyFuncs and TLinkerNameMapKeyFuncs for use with TSet and TMap.
- These allow ULinkerSave and ULinkerLoad to correctly write out case-variants for FNames, and also fixes an issue where the linker would erroneously write out duplicate string table entries for FNames which had a different number (causing package bloat).
- Bumped VER_MIN_SCRIPTVM_UE4 so that all Blueprint bytecode is recompiled using FScriptName.
ReviewedBy Robert.Manuszewski, Gil.Gribb
[CL 2300730 by Jamie Dale in Main branch]