Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example code to parse a .uasset file #11

Closed
healermagnus opened this issue Mar 26, 2023 · 1 comment
Closed

example code to parse a .uasset file #11

healermagnus opened this issue Mar 26, 2023 · 1 comment

Comments

@healermagnus
Copy link

Can't seem to find the starting place. The example code presumes a pak or a "game", but I want to parse .uasset files.

# parameter passed is something like /path/to/a/file/file.uasset
path = sys.argv[1]
provider = DefaultFileProvider(os.path.dirname(path), VersionContainer(EUEVersion.LATEST))
provider.initialize()

package_path = os.path.basename(path)
#stream = provider.open_stream(package_path)
#package = provider.try_load_package(stream)
package = provider.try_load_package(package_path)    
if package is not None:
    package_dict = package.get_dict() # get json serializable dict
@MinshuG
Copy link
Owner

MinshuG commented Mar 26, 2023

Use LegacyPackageReader directly

class LegacyPackageReader(Package):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants