Added Genoration of patching rule for source project that have a _[0-9]+ style suffix for header patching

AssetTools.cpp is the substance for this fix.
ValkyrieProjectManager and DuplicatePluginCommandlet are for testing on Horde.


#rb Francis.Hurteau

[CL 33573769 by andrew phillips in ue5-main branch]
This commit is contained in:
andrew phillips
2024-05-10 09:53:58 -04:00
parent 77b7eea040
commit 376f5c1ac6

View File

@@ -2235,6 +2235,18 @@ TMap<FString, FString> GenerateAdditionalAssetMappings(const TMap<FString, FStri
FStringView SrcPackageName = FPathViews::GetBaseFilename(SrcNameString);
FStringView DstPackageName = FPathViews::GetBaseFilename(DstNameString);
// If the Source Package has a '_[0-9]+' tail, we need a rule to match it without that tail
// as the number is not stored in the string in the FName table.
{
FName SrcName(SrcPackageName); // vk_0
int32 SrcNameLen = (int32)SrcName.GetPlainNameString(SrcNameBuffer);
FStringView SrcNameView{ SrcNameBuffer, SrcNameLen }; // vk
if (SrcNameLen != SrcPackageName.Len())
{
Result.Add({ FString(SrcNameView), FString(DstPackageName) }); // vk => Dest
}
}
// Inject Path.ObjectName
// NOTE: this would be better to use a string builder.
Result.Add({ SrcNameString + TCHAR('.') + SrcPackageName, DstNameString + TCHAR('.') + DstPackageName });