Fix to import into Carla content directly, instead of on a new package

This commit is contained in:
bernatx 2022-07-20 01:10:11 +02:00 committed by bernat
parent 5348c0e5b0
commit 3083c8e2ed
1 changed files with 4 additions and 1 deletions

View File

@ -329,7 +329,10 @@ void ULoadAssetMaterialsCommandlet::LoadAssetsMaterials(const FString &PackageNa
MapObjectLibrary = UObjectLibrary::CreateLibrary(UWorld::StaticClass(), false, GIsEditor);
const FString DefaultPath = TEXT("/Game/") + PackageName + TEXT("/Maps/");
MapObjectLibrary->AddToRoot();
MapObjectLibrary->LoadAssetDataFromPath(*DefaultPath);
for (auto &&data : MapsPaths)
{
MapObjectLibrary->LoadAssetDataFromPath(*data.Path);
}
MapObjectLibrary->LoadAssetsFromAssetData();
MapObjectLibrary->GetAssetDataList(AssetDatas);