Expand description
§uasset-lens-git-diff
Diff Unreal Engine 5 assets between Git HEAD and the working tree.
Compares an asset’s committed version (via git show HEAD:<path>) against the copy on disk and
reports the semantic delta: dependencies added/removed, asset-type changes, and Blueprint metric
shifts. Lets CI comment on what actually changed inside a .uasset in a pull request.
Part of uasset-lens — a fast, CLI-first
static analyzer for Unreal Engine 5 assets that runs without opening the editor. This crate
provides HEAD-vs-disk asset diffing. Depends on: uasset-lens-shared. Used by: the uasset-lens CLI.
§Usage
use std::path::Path;
use uasset_lens_git_diff::diff_asset;
use uasset_lens_shared::AssetPath;
let asset = AssetPath::new("/Game/Characters/BP_Player")?;
let project_dir = Path::new("MyProject");
let content_root = Path::new("MyProject/Content");
if let Some(diff) = diff_asset(&asset, project_dir, content_root)? {
println!(
"+{} deps, -{} deps",
diff.deps_added.len(),
diff.deps_removed.len(),
);
}§Minimum supported Rust version
1.96.0
§License
Licensed under either of MIT or Apache-2.0 at your option.
Structs§
Enums§
Functions§
- diff_
asset - Compare the current on-disk version of
asset_pathagainst the HEAD-committed version. ReturnsNonewhen the file is untracked, the repo has no prior commit, or the scan fails.