Expand description
§The Rust uasset Library
uasset 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, first add this to your Cargo.toml:
[dependencies]
uasset = "^0.2"Then import AssetHeader into your program:
use uasset::AssetHeader;Finally, parse a file using AssetHeader::new.
§Example
let file = File::open(path)?;
let package = AssetHeader::new(&file)?;
for import in package.package_import_iter() {
println!("Import: {}", import);
}§Crate features
commandline-tool- Allows the building of auassetcommand line tool that can be used to inspect specific assets.
Re-exports§
pub use enums::ObjectVersion;pub use enums::ObjectVersionUE5;pub use enums::PackageFlags;
Modules§
Structs§
- Archive
- Asset
Header - A table of contents for a uasset loaded from disk, containing all the shared package summary information.
This roughly maps to
FPackageFileSummaryin Engine/Source/Runtime/CoreUObject/Public/UObject/PackageFileSummary.h, except we load some of the indirectly referenced data (i.e. names, imports, exports). - Import
Iterator - Iterator over the imported packages in a given
AssetHeader - Invalid
Name Index Error - Error when attempting to resolve an index
- Name
Reference - A reference to a name in the
AssetHeader::namesname table. You can useAssetHeader::resolve_nameto get a human-readable string from aNameReference. It only makes sense to compareNameReferences from the sameAssetHeader. - Object
Export - A reference to an object in another package. Typically accessed through
AssetHeader::package_import_iter, but you can also manually resolve theNameReferences. (C++ name:FObjectImport) - Object
Import - A reference to an object in another package. Typically accessed through
AssetHeader::package_import_iter, but you can also manually resolve theNameReferences. (C++ name:FObjectImport) - Thumbnail
Info - Represents the metadata about a thumbnail for an asset, stored behind [
AssetHeader::thumbnail_table_offsets] (seeThumbnailTools::LoadThumbnailsFromPackageInternal)
Enums§
- Custom
Version Serialization Format - The format of an asset’s custom versions, derived from
legacy_version(seeFCustomVersionContainer::Serialize) - Error
- Errors from parsing an asset
- Object
Reference - A reference to either an import or an export in the asset.
Type Aliases§
- Result
- Results from parsing a uasset