40 lines
1020 B
C++
40 lines
1020 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "Cooker/MPCookTrace.h"
|
||
|
|
#include "Materials/MaterialInstanceConstant.h"
|
||
|
|
|
||
|
|
DEFINE_LOG_CATEGORY(LogMPCookTrace);
|
||
|
|
|
||
|
|
namespace UE
|
||
|
|
{
|
||
|
|
namespace Cook
|
||
|
|
{
|
||
|
|
// Define the list of packages we want to trace during the cook.
|
||
|
|
const TArray<FName> GPackagesToTrace =
|
||
|
|
{
|
||
|
|
"/TapCommon/BPTDUHUD",
|
||
|
|
"/TapCommon/TURoundBorderBP.TURoundBorderBP_C",
|
||
|
|
"/Game/Asset/TA/Char/Materials/Weapon/M_Weapon_Jade.M_Weapon_Jade"};
|
||
|
|
|
||
|
|
// Helper function to check if a package is in our trace list.
|
||
|
|
// We check by leaf name to handle cases where the full path might vary (e.g., _C suffixes for Blueprints).
|
||
|
|
bool CookTrace::IsTargetPackage(const FName& PackageName)
|
||
|
|
{
|
||
|
|
if (PackageName == NAME_None)
|
||
|
|
{
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
FString PackageString = PackageName.ToString();
|
||
|
|
for (const FName& TargetName: GPackagesToTrace)
|
||
|
|
{
|
||
|
|
if (PackageString.Contains(TargetName.ToString()))
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace Cook
|
||
|
|
} // namespace UE
|