Repository navigation
Adds two Rust APIs to unity-rs-core for reading single objects cheaply: open one UnityFS entry without decoding the blocks before it, and read an object with a type tree you supply. Upgrade if you read small objects deep inside large bundles or MonoBehaviours from player builds with stripped type trees. Python, Node and CLI behaviour does not change.
Added
- Open one UnityFS entry as a random-access
RegionwithUnityFsBundle::entry_region. A read decodes only the storage blocks it overlaps and keeps decoded blocks in a bounded LRU (ENTRY_REGION_CACHE_BYTES, 8 MiB, always holding the latest block), so reading a small object deep inside a large entry no longer decodes, or on a remote source downloads, every block before it. Corrupted blocks surface asInvalidDataI/O errors. (#40) - Read one object with a caller-supplied
TypeTreethroughSerializedFile::read_type_tree_value_with_tree, without consulting the object's type metadata or resolvingm_Script. A MonoBehaviour with a known layout can now be read from its own file even when the build strips type trees. The tree must consume the payload exactly, so a wrong candidate layout fails instead of returning a partial value. (#41)
Artifacts
- Python:
unity-rs0.6.1 on PyPI (cp39-abi3wheels for six platforms and an sdist). - Rust:
unity-rs-coreandunity-rs-cli0.6.1 on crates.io. - CLI archives (
unity-rs-cli-0.6.1-<platform>) and Node.js addon packages (unity-rs-node-0.6.1-<platform>.tgz) for Linux, macOS and Windows on x64 and arm64: attached below, with checksums inSHA256SUMS-v0.6.1.txt.
Maintenance
Full Changelog: v0.6.0...v0.6.1