Crate uasset[][src]

Expand description

githubcrates-iodocs-rs

The Rust UAsset Library

uasset-rs is a pure Rust implementation of the Unreal Engine .uasset file format. It gives you direct access to fields & values in the uasset format, and is intended to allow you to build tools outside of the Unreal Editor to work with uassets.

Usage

To use uasset-rs, first add this to your Cargo.toml:

[dependencies]
uasset = "^0.1"

Then import PackageFileSummary into your program:

use uasset::PackageFileSummary;

Finally, parse a file using PackageFileSummary::new.

Example

let file = File::open(path)?;
let package = PackageFileSummary::new(&file)?;
for import in package.package_import_iter() {
    println!("Import: {}", import);
}

Crate features

  • commandline-tool - Allows the building of a uasset command line tool that can be used to inspect specific assets.

Structs

ImportIterator

Iterator over the imported packages in a given PackageFileSummary

InvalidNameIndexError

Error when attempting to resolve an index

PackageFileSummary

A table of contents for a uasset loaded from disk, containing all the shared package summary information. This roughly maps to FPackageFileSummary in Engine/Source/Runtime/CoreUObject/Public/UObject/PackageFileSummary.h, except we load some of the indirectly referenced data (i.e. names, imports, exports).

Enums

Error

Errors from parsing an asset

ObjectVersion

Maps to EUnrealEngineObjectUE4Version in Engine/Source/Runtime/Core/Public/UObject/ObjectVersion.h – this tracks the various versions to the core serialized object format.

PackageFlags

Maps to EPackageFlags in Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h. The UnusedN entries exist for completeness, presumably those entries were used in the past.

Type Definitions

Result

Results from parsing a uasset