diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Commandlet/MoveAssetsCommandlet.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Commandlet/MoveAssetsCommandlet.cpp index da223c5e5..a0f78df47 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Commandlet/MoveAssetsCommandlet.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Commandlet/MoveAssetsCommandlet.cpp @@ -96,13 +96,12 @@ void MoveFiles(const TArray &Assets, const FString &DestPath) { continue; } - - new(AssetsAndNames) FAssetRenameData(Asset, DestPath, Asset->GetName()); + AssetsAndNames.Emplace(Asset, DestPath, Asset->GetName()); } if (AssetsAndNames.Num() > 0) { - AssetToolsModule.Get().RenameAssetsWithDialog(AssetsAndNames); + AssetToolsModule.Get().RenameAssets(AssetsAndNames); } } @@ -181,6 +180,7 @@ void UMoveAssetsCommandlet::MoveAssetsFromMapForSemanticSegmentation( for (const auto &Elem : AssetDataMap) { FString DestPath = TEXT("/Game/") + PackageName + TEXT("/Static/") + Elem.Key + "/" + MapName; + MoveFiles(Elem.Value, DestPath); } }