Skip to content

Mesh Import #304

@MKapers

Description

@MKapers

import os
import UnityPy

env = UnityPy.load("name.assetbundle")

extract_dir = 'Mesh/name'
os.makedirs(extract_dir, exist_ok=True)

for obj in env.objects:
if obj.type.name == "Mesh":
mesh = obj.read()

    output_path = os.path.join(extract_dir, f"{mesh.name}.obj")
    
    with open(output_path, "wt", newline="") as f:
        f.write(mesh.export())

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions