Added a Fix materials button in Payday2MapBuilder so it PAYDAY 3 Loads the map
This commit is contained in:
parent
aeb67fdfea
commit
85e8368259
@ -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])
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user