该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
如题!已经pak资源包已经加载在内存中了,但是不知道如何把pak的uasset引用出现在地图当中?请各位大佬帮助提示下,非常感谢!
代码:
for (int i = 0; i < FileList.Num(); i++)
{
FString AssetName = FileList[i];
FString AssetShortName = FPackageName::GetShortName(AssetName);
FString LeftStr;
FString RightStr;
AssetShortName.Split(TEXT("."), &LeftStr, &RightStr);
if (RightStr == TEXT("uasset") || RightStr.Contains(TEXT("umap"))) {
AssetName = TEXT("/Game/Topak/") + LeftStr + TEXT(".") + LeftStr; //我们加载的时候用的是这个路径
//GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, *AssetName);
FStringAssetReference reference = AssetName;
AssetsToLoad.Add(AssetName);
}
else {
// todo error