diff --git a/unreal_asset/src/asset.rs b/unreal_asset/src/asset.rs index 8505604..fa67c0f 100644 --- a/unreal_asset/src/asset.rs +++ b/unreal_asset/src/asset.rs @@ -880,6 +880,14 @@ impl<'a, C: Read + Seek> Asset { let class_name = self.read_fname()?; let outer_index = PackageIndex::new(self.read_i32::()?); let object_name = self.read_fname()?; + + let package_name = match self.get_object_version() + >= ObjectVersion::VER_UE4_NON_OUTER_PACKAGE_IMPORT + { + true => Some(self.read_fname()?), + false => None, + }; + let optional = match self.get_object_version_ue5() >= ObjectVersionUE5::OPTIONAL_RESOURCES { true => self.read_i32::()? == 1, @@ -891,6 +899,7 @@ impl<'a, C: Read + Seek> Asset { class_name, outer_index, object_name, + package_name, optional, ); self.imports.push(import); diff --git a/unreal_asset/unreal_asset_base/src/import.rs b/unreal_asset/unreal_asset_base/src/import.rs index f3eaf39..663d626 100644 --- a/unreal_asset/unreal_asset_base/src/import.rs +++ b/unreal_asset/unreal_asset_base/src/import.rs @@ -18,6 +18,8 @@ pub struct Import { pub outer_index: PackageIndex, /// Object name pub object_name: FName, + /// Package name + pub package_name: Option, /// Is the import optional pub optional: bool, } @@ -34,6 +36,7 @@ impl Import { class_name: FName, outer_index: PackageIndex, object_name: FName, + package_name: Option, optional: bool, ) -> Self { Import { @@ -41,6 +44,7 @@ impl Import { class_name, object_name, outer_index, + package_name, optional, } }