Fix for import process in UE 4.26

This commit is contained in:
bernat 2021-02-25 11:25:45 +01:00
parent 6d1511d759
commit 7a2c12cfe5
1 changed files with 3 additions and 3 deletions

View File

@ -96,13 +96,12 @@ void MoveFiles(const TArray<UObject *> &Assets, const FString &DestPath)
{ {
continue; continue;
} }
AssetsAndNames.Emplace(Asset, DestPath, Asset->GetName());
new(AssetsAndNames) FAssetRenameData(Asset, DestPath, Asset->GetName());
} }
if (AssetsAndNames.Num() > 0) if (AssetsAndNames.Num() > 0)
{ {
AssetToolsModule.Get().RenameAssetsWithDialog(AssetsAndNames); AssetToolsModule.Get().RenameAssets(AssetsAndNames);
} }
} }
@ -181,6 +180,7 @@ void UMoveAssetsCommandlet::MoveAssetsFromMapForSemanticSegmentation(
for (const auto &Elem : AssetDataMap) for (const auto &Elem : AssetDataMap)
{ {
FString DestPath = TEXT("/Game/") + PackageName + TEXT("/Static/") + Elem.Key + "/" + MapName; FString DestPath = TEXT("/Game/") + PackageName + TEXT("/Static/") + Elem.Key + "/" + MapName;
MoveFiles(Elem.Value, DestPath); MoveFiles(Elem.Value, DestPath);
} }
} }