diff --git a/UE4_Importer.py b/UE4_Importer.py index 4968610..4d00f2a 100644 --- a/UE4_Importer.py +++ b/UE4_Importer.py @@ -20,12 +20,13 @@ for root, dirs, files in os.walk(model_directory): relative_path = os.path.relpath(file_path, model_directory) # Construct the destination path in the Content Browser - destination_path = "/Game/units/" + os.path.splitext(relative_path.replace("\\", "/"))[0] + destination_path = "/Game/Mods/YourModName/Units/" + os.path.splitext(relative_path.replace("\\", "/"))[0] # Create an import task import_task = unreal.AssetImportTask() import_task.filename = file_path import_task.destination_path = destination_path + import_task.automated = True # Import the .fbx file asset_tools.import_asset_tasks([import_task]) diff --git a/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/PDWorldJson.uasset b/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/PDWorldJson.uasset index a3fa7fa..cd1a915 100644 Binary files a/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/PDWorldJson.uasset and b/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/PDWorldJson.uasset differ diff --git a/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/WBP_PD2LevelConstuctor.uasset b/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/WBP_PD2LevelConstuctor.uasset index 027578c..8f8f847 100644 Binary files a/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/WBP_PD2LevelConstuctor.uasset and b/UnrealEditorFiles/UE4/Content/Payday2MapBuilder/WBP_PD2LevelConstuctor.uasset differ diff --git a/pdworld2json.py b/pdworld2json.py index e746e5b..15f1c05 100644 --- a/pdworld2json.py +++ b/pdworld2json.py @@ -59,7 +59,7 @@ def parse_xml_to_json(xml_file_path, json_file_path, include_unit_id=False): } # Generate Unreal object reference - object_reference = f"/Script/Engine.StaticMesh'/Game/{path}/{unit_description}.{unit_description}'" + object_reference = f"/Script/Engine.StaticMesh'/Game/Mods/YourModName/Units/{path}/{unit_description}.{unit_description}'" # Use 'name' instead of 'unit_id' unit_data = {