diff --git a/Analyzer/Properties/Resources.Designer.cs b/Analyzer/Properties/Resources.Designer.cs index 6eab80f..57da7d6 100644 --- a/Analyzer/Properties/Resources.Designer.cs +++ b/Analyzer/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -60,899 +60,228 @@ internal Resources() { } } - /// - /// Looks up a localized string similar to create table addressables_build_bundle_dependencies - ///( - /// bundle_id INTEGER, - /// build_id INTEGER, - /// dependency_rid INTEGER, - /// PRIMARY KEY (bundle_id, build_id, dependency_rid), - /// FOREIGN KEY (bundle_id, build_id) REFERENCES addressables_build_bundles(id, build_id) - ///);. - /// internal static string AddrBuildBundleDependencies { get { return ResourceManager.GetString("AddrBuildBundleDependencies", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_bundle_dependent_bundles - ///( - /// bundle_id INTEGER, - /// build_id INTEGER, - /// dependent_bundle_rid INTEGER, - /// PRIMARY KEY (bundle_id, build_id, dependent_bundle_rid), - /// FOREIGN KEY (bundle_id, build_id) REFERENCES addressables_build_bundles(id, build_id) - ///);. - /// internal static string AddrBuildBundleDependentBundles { get { return ResourceManager.GetString("AddrBuildBundleDependentBundles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_bundle_expanded_dependencies - ///( - /// bundle_id INTEGER, - /// build_id INTEGER, - /// dependency_rid INTEGER, - /// PRIMARY KEY (bundle_id, build_id, dependency_rid), - /// FOREIGN KEY (bundle_id, build_id) REFERENCES addressables_build_bundles(id, build_id) - ///);. - /// internal static string AddrBuildBundleExpandedDependencies { get { return ResourceManager.GetString("AddrBuildBundleExpandedDependencies", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_bundle_files - ///( - /// bundle_id INTEGER, - /// build_id INTEGER, - /// file_rid INTEGER, - /// PRIMARY KEY (bundle_id, build_id, file_rid), - /// FOREIGN KEY (bundle_id, build_id) REFERENCES addressables_build_bundles(id, build_id) - ///);. - /// internal static string AddrBuildBundleFiles { get { return ResourceManager.GetString("AddrBuildBundleFiles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_bundle_regular_dependencies - ///( - /// bundle_id INTEGER, - /// build_id INTEGER, - /// dependency_rid INTEGER, - /// PRIMARY KEY (bundle_id, build_id, dependency_rid), - /// FOREIGN KEY (bundle_id, build_id) REFERENCES addressables_build_bundles(id, build_id) - ///);. - /// internal static string AddrBuildBundleRegularDependencies { get { return ResourceManager.GetString("AddrBuildBundleRegularDependencies", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_bundles - ///( - /// id INTEGER, - /// build_id INTEGER, - /// asset_count INTEGER, - /// build_status INTEGER, - /// crc INTEGER, - /// compression TEXT, - /// dependency_file_size INTEGER, - /// expanded_dependency_file_size INTEGER, - /// file_size INTEGER, - /// group_rid INTEGER, - /// hash TEXT, - /// internal_name TEXT, - /// load_path TEXT, - /// name TEXT, - /// provider TEXT, - /// result_type TEXT, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildBundles { get { return ResourceManager.GetString("AddrBuildBundles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_data_from_other_asset_object_references - ///( - /// data_from_other_asset_id INTEGER, - /// build_id INTEGER, - /// local_identifier_in_file INTEGER, - /// asset_id INTEGER, - /// object_id INTEGER, - /// PRIMARY KEY (data_from_other_asset_id, build_id, local_identifier_in_file, asset_id, object_id), - /// FOREIGN KEY (data_from_other_asset_id, build_id, local_identifier_in_file) REFERENCES addressables_build_data_from_other_asset_objects(data_from_other_asset_id, build_id, local_identifier_in_file) - /// [rest of string was truncated]";. - /// internal static string AddrBuildDataFromOtherAssetObjectReferences { get { return ResourceManager.GetString("AddrBuildDataFromOtherAssetObjectReferences", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_data_from_other_asset_objects - ///( - /// data_from_other_asset_id INTEGER, - /// build_id INTEGER, - /// asset_type INTEGER, - /// component_name TEXT, - /// local_identifier_in_file INTEGER, - /// object_name TEXT, - /// serialized_size INTEGER, - /// streamed_size INTEGER, - /// PRIMARY KEY (data_from_other_asset_id, build_id, local_identifier_in_file), - /// FOREIGN KEY (data_from_other_asset_id, build_id) REFERENCES addressables_build_data_from_other_assets(id, build_id) - ///);. - /// internal static string AddrBuildDataFromOtherAssetObjects { get { return ResourceManager.GetString("AddrBuildDataFromOtherAssetObjects", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_data_from_other_asset_referencing_assets - ///( - /// data_from_other_asset_id INTEGER, - /// build_id INTEGER, - /// referencing_asset_rid INTEGER, - /// PRIMARY KEY (data_from_other_asset_id, build_id, referencing_asset_rid), - /// FOREIGN KEY (data_from_other_asset_id, build_id) REFERENCES addressables_build_data_from_other_assets(id, build_id) - ///);. - /// internal static string AddrBuildDataFromOtherAssetReferencingAssets { get { return ResourceManager.GetString("AddrBuildDataFromOtherAssetReferencingAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_data_from_other_assets - ///( - /// id INTEGER, - /// build_id INTEGER, - /// asset_guid TEXT, - /// asset_path TEXT, - /// file INTEGER, - /// main_asset_type INTEGER, - /// object_count INTEGER, - /// serialized_size INTEGER, - /// streamed_size INTEGER, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildDataFromOtherAssets { get { return ResourceManager.GetString("AddrBuildDataFromOtherAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_explicit_asset_externally_referenced_assets - ///( - /// explicit_asset_id INTEGER, - /// build_id INTEGER, - /// externally_referenced_asset_rid INTEGER, - /// PRIMARY KEY (explicit_asset_id, build_id, externally_referenced_asset_rid), - /// FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addressables_build_explicit_assets(id, build_id) - ///);. - /// internal static string AddrBuildExplicitAssetExternallyReferencedAssets { get { return ResourceManager.GetString("AddrBuildExplicitAssetExternallyReferencedAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_explicit_asset_internal_referenced_explicit_assets - ///( - /// explicit_asset_id INTEGER, - /// build_id INTEGER, - /// internal_referenced_explicit_asset_rid INTEGER, - /// PRIMARY KEY (explicit_asset_id, build_id, internal_referenced_explicit_asset_rid), - /// FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addressables_build_explicit_assets(id, build_id) - ///);. - /// internal static string AddrBuildExplicitAssetInternalReferencedExplicitAssets { get { return ResourceManager.GetString("AddrBuildExplicitAssetInternalReferencedExplicitAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_explicit_asset_internal_referenced_other_assets - ///( - /// explicit_asset_id INTEGER, - /// build_id INTEGER, - /// internal_referenced_other_asset_rid INTEGER, - /// PRIMARY KEY (explicit_asset_id, build_id, internal_referenced_other_asset_rid), - /// FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addressables_build_explicit_assets(id, build_id) - ///);. - /// internal static string AddrBuildExplicitAssetInternalReferencedOtherAssets { get { return ResourceManager.GetString("AddrBuildExplicitAssetInternalReferencedOtherAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_explicit_asset_labels - ///( - /// explicit_asset_id INTEGER, - /// build_id INTEGER, - /// label TEXT, - /// PRIMARY KEY (explicit_asset_id, build_id, label), - /// FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addressables_build_explicit_assets(id, build_id) - ///);. - /// internal static string AddrBuildExplicitAssetLabels { get { return ResourceManager.GetString("AddrBuildExplicitAssetLabels", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_explicit_assets - ///( - /// id INTEGER, - /// build_id INTEGER, - /// bundle INTEGER, - /// file INTEGER, - /// asset_hash TEXT, - /// asset_path TEXT, - /// addressable_name TEXT, - /// group_guid TEXT, - /// guid TEXT, - /// internal_id TEXT, - /// main_asset_type INTEGER, - /// serialized_size INTEGER, - /// streamed_size INTEGER, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildExplicitAssets { get { return ResourceManager.GetString("AddrBuildExplicitAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_file_assets - ///( - /// file_id INTEGER, - /// build_id INTEGER, - /// asset_rid INTEGER, - /// PRIMARY KEY (file_id, build_id, asset_rid), - /// FOREIGN KEY (file_id, build_id) REFERENCES addressables_build_files(id, build_id) - ///);. - /// internal static string AddrBuildFileAssets { get { return ResourceManager.GetString("AddrBuildFileAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_file_external_references - ///( - /// file_id INTEGER, - /// build_id INTEGER, - /// external_reference_rid INTEGER, - /// PRIMARY KEY (file_id, build_id, external_reference_rid), - /// FOREIGN KEY (file_id, build_id) REFERENCES addressables_build_files(id, build_id) - ///);. - /// internal static string AddrBuildFileExternalReferences { get { return ResourceManager.GetString("AddrBuildFileExternalReferences", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_file_other_assets - ///( - /// file_id INTEGER, - /// build_id INTEGER, - /// other_asset_rid INTEGER, - /// PRIMARY KEY (file_id, build_id, other_asset_rid), - /// FOREIGN KEY (file_id, build_id) REFERENCES addressables_build_files(id, build_id) - ///);. - /// internal static string AddrBuildFileOtherAssets { get { return ResourceManager.GetString("AddrBuildFileOtherAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_files - ///( - /// id INTEGER, - /// build_id INTEGER, - /// bundle INTEGER, - /// bundle_object_info_size INTEGER, - /// mono_script_count INTEGER, - /// mono_script_size INTEGER, - /// name TEXT, - /// preload_info_size INTEGER, - /// write_result_filename TEXT, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildFiles { get { return ResourceManager.GetString("AddrBuildFiles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_file_sub_files - ///( - /// file_id INTEGER, - /// build_id INTEGER, - /// sub_file_rid INTEGER, - /// PRIMARY KEY (file_id, build_id, sub_file_rid), - /// FOREIGN KEY (file_id, build_id) REFERENCES addressables_build_files(id, build_id) - ///);. - /// internal static string AddrBuildFileSubFiles { get { return ResourceManager.GetString("AddrBuildFileSubFiles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_group_bundles - ///( - /// group_id INTEGER, - /// build_id INTEGER, - /// bundle_rid INTEGER, - /// PRIMARY KEY (group_id, build_id, bundle_rid), - /// FOREIGN KEY (group_id, build_id) REFERENCES addressables_build_groups(id, build_id) - ///);. - /// internal static string AddrBuildGroupBundles { get { return ResourceManager.GetString("AddrBuildGroupBundles", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_groups - ///( - /// id INTEGER, - /// build_id INTEGER, - /// guid TEXT, - /// name TEXT, - /// packing_mode TEXT, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildGroups { get { return ResourceManager.GetString("AddrBuildGroups", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_group_schemas - ///( - /// group_id INTEGER, - /// build_id INTEGER, - /// schema_rid INTEGER, - /// PRIMARY KEY (group_id, build_id, schema_rid), - /// FOREIGN KEY (group_id, build_id) REFERENCES addressables_build_groups(id, build_id) - ///);. - /// internal static string AddrBuildGroupSchemas { get { return ResourceManager.GetString("AddrBuildGroupSchemas", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE addressables_builds - ///( - /// id INTEGER, - /// name TEXT, - /// build_target INTEGER, - /// start_time TEXT, - /// duration REAL, - /// error TEXT, - /// package_version TEXT, - /// player_version TEXT, - /// build_script TEXT, - /// result_hash TEXT, - /// type INTEGER, - /// unity_version TEXT, - /// PRIMARY KEY (id) - ///);. - /// internal static string AddrBuilds { get { return ResourceManager.GetString("AddrBuilds", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_schema_data_pairs - ///( - /// schema_id INTEGER, - /// build_id INTEGER, - /// key TEXT, - /// value TEXT, - /// PRIMARY KEY (schema_id, build_id, key), - /// FOREIGN KEY (schema_id, build_id) REFERENCES addressables_build_schemas(id, build_id) - ///);. - /// internal static string AddrBuildSchemaDataPairs { get { return ResourceManager.GetString("AddrBuildSchemaDataPairs", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_schemas - ///( - /// id INTEGER, - /// build_id INTEGER, - /// guid TEXT, - /// type TEXT, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildSchemas { get { return ResourceManager.GetString("AddrBuildSchemas", resourceCulture); } } - /// - /// Looks up a localized string similar to create table addressables_build_sub_files - ///( - /// id INTEGER, - /// build_id INTEGER, - /// is_serialized_file INTEGER, - /// name TEXT, - /// size INTEGER, - /// PRIMARY KEY (id, build_id) - ///);. - /// internal static string AddrBuildSubFiles { get { return ResourceManager.GetString("AddrBuildSubFiles", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE animation_clips( - /// id INTEGER, - /// legacy INTEGER, - /// events INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE VIEW animation_view AS - ///SELECT - /// o.*, - /// a.legacy, - /// a.events - ///FROM object_view o INNER JOIN animation_clips a ON o.id = a.id; - ///. - /// internal static string AnimationClip { get { return ResourceManager.GetString("AnimationClip", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE assets( - /// object INTEGER, - /// name TEXT - ///); - /// - ///CREATE TABLE asset_dependencies( - /// object INTEGER, - /// dependency INTEGER - ///); - /// - ///CREATE VIEW asset_view AS - ///SELECT - /// a.name AS asset_name, - /// o.* - ///FROM assets a INNER JOIN object_view o ON o.id = a.object; - /// - ///CREATE VIEW asset_dependencies_view AS - ///SELECT a.id, a.asset_name, a.asset_bundle, a.type, od.id dep_id, od.asset_bundle dep_asset_bundle, od.name dep_name, od.type dep_type - ///FROM asset_view a - ///INNER JOIN asset_dependencies d ON a [rest of string was truncated]";. - /// internal static string AssetBundle { get { return ResourceManager.GetString("AssetBundle", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE audio_load_types( - /// id INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE audio_formats( - /// id INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE audio_clips( - /// id INTEGER, - /// bits_per_sample INTEGER, - /// frequency INTEGER, - /// channels INTEGER, - /// load_type INTEGER, - /// format INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE VIEW audio_clip_view AS - ///SELECT - /// o.*, - /// a.bits_per_sample, - /// a.frequency, - /// a.channels, - /// l.name AS load_type, - /// f.name AS form [rest of string was truncated]";. - /// internal static string AudioClip { get { return ResourceManager.GetString("AudioClip", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE IF NOT EXISTS build_reports( - /// id INTEGER, - /// build_type TEXT, - /// build_result TEXT, - /// platform_name TEXT, - /// subtarget INTEGER, - /// start_time TEXT, - /// end_time TEXT, - /// total_time_seconds INTEGER, - /// total_size INTEGER, - /// build_guid TEXT, - /// total_errors INTEGER, - /// total_warnings INTEGER, - /// options INTEGER, - /// asset_bundle_options INTEGER, - /// output_path TEXT, - /// crc INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE IF NOT EXISTS build_report_files( - /// build_report_id INTEGER NOT NULL, - /// file_index INTEGER NOT NULL, - /// path TEXT NOT NULL, - /// role TEXT NOT NULL, - /// size INTEGER NOT NULL, - /// PRIMARY KEY (build_report_id, file_index), - /// FOREIGN KEY (build_report_id) REFERENCES build_reports(id) - ///); - /// - ///CREATE TABLE IF NOT EXISTS build_report_archive_contents( - /// build_report_id INTEGER NOT NULL, - /// assetbundle TEXT NOT NULL, - /// assetbundle_content TEXT NOT NULL, - /// PRIMARY KEY (build_report_id, assetbundle_content), - /// FOREIGN KEY (build_report_id) REFERENCES build_reports(id) - ///); - /// - ///CREATE VIEW build_report_files_view AS - ///SELECT - /// o.serialized_file, - /// br.id AS build_report_id, - /// br.build_type, - /// br.platform_name, - /// brf.file_index, - /// brf.path, - /// brf.role, - /// brf.size - ///FROM build_report_files brf - ///INNER JOIN build_reports br ON brf.build_report_id = br.id - ///INNER JOIN object_view o ON br.id = o.id; - ///. - /// internal static string BuildReport { get { return ResourceManager.GetString("BuildReport", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE INDEX refs_object_index ON refs(object); - ///CREATE INDEX refs_referenced_object_index ON refs(referenced_object); - ///. - /// internal static string Finalize { get { return ResourceManager.GetString("Finalize", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE types - ///( - /// id INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE asset_bundles - ///( - /// id INTEGER, - /// name TEXT, - /// file_size INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE serialized_files - ///( - /// id INTEGER, - /// asset_bundle INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE objects - ///( - /// id INTEGER, - /// object_id INTEGER, - /// serialized_file INTEGER, - /// type INTEGER, - /// name TEXT, - /// game_object INTEGER, - /// size INTEGER, - /// crc32 INTE [rest of string was truncated]";. - /// internal static string Init { get { return ResourceManager.GetString("Init", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE meshes( - /// id INTEGER, - /// sub_meshes INTEGER, - /// blend_shapes INTEGER, - /// bones INTEGER, - /// indices INTEGER, - /// vertices INTEGER, - /// compression INTEGER, - /// rw_enabled INTEGER, - /// vertex_size INTEGER, - /// channels TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE VIEW mesh_view AS - ///SELECT - /// o.*, - /// m.sub_meshes, - /// m.blend_shapes, - /// m.bones, - /// m.indices, - /// m.vertices, - /// m.compression, - /// m.rw_enabled, - /// m.vertex_size, - /// m.channels - ///FROM meshes m - ///INNER JOIN [rest of string was truncated]";. - /// internal static string Mesh { get { return ResourceManager.GetString("Mesh", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE shaders( - /// id INTEGER, - /// decompressed_size INTEGER, - /// unique_programs INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE shader_keywords( - /// id INTEGER, - /// keyword TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE shader_subprogram_keywords( - /// subprogram_id INTEGER, - /// keyword_id INTEGER - ///); - /// - ///CREATE TABLE shader_apis( - /// id INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE shader_subprograms( - /// id INTEGER, - /// shader INTEGER, - /// sub_shader INTEGER, - /// [rest of string was truncated]";. - /// internal static string Shader { get { return ResourceManager.GetString("Shader", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE texture_formats - ///( - /// id INTEGER, - /// name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE textures - ///( - /// id INTEGER, - /// width INTEGER, - /// height INTEGER, - /// format INTEGER, - /// mip_count INTEGER, - /// rw_enabled INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE VIEW texture_view AS - ///SELECT - /// o.*, - /// t.width, - /// t.height, - /// f.name AS format, - /// t.mip_count, - /// t.rw_enabled - ///FROM object_view o - ///INNER JOIN textures t ON o.id = t.id - ///LEFT JOIN texture_formats f ON t.format = f [rest of string was truncated]";. - /// internal static string Texture2D { get { return ResourceManager.GetString("Texture2D", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE IF NOT EXISTS monoscripts( - /// id INTEGER, - /// class_name TEXT, - /// namespace TEXT, - /// assembly_name TEXT, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE VIEW monoscript_view AS - ///SELECT - /// o.id, - /// o.object_id, - /// o.asset_bundle, - /// o.serialized_file, - /// m.class_name, - /// m.namespace, - /// m.assembly_name - ///FROM object_view o INNER JOIN monoscripts m ON o.id = m.id; - /// - ///CREATE VIEW script_object_view AS - ///SELECT - /// mb.id, - /// mb.object_id, - /// mb.asset_bundle, - /// mb.serialized_file, - /// mb.name, - /// mb.type, - /// mb.size, - /// mb.pretty_size, - /// ms.class_name, - /// ms.namespace, - /// ms.assembly_name - ///FROM object_view mb - ///INNER JOIN refs r ON mb.id = r.object - ///INNER JOIN monoscript_view ms ON r.referenced_object = ms.id - ///WHERE mb.type = 'MonoBehaviour' AND r.property_type = 'MonoScript'; - ///. - /// internal static string MonoScript { get { return ResourceManager.GetString("MonoScript", resourceCulture); } } - /// - /// Looks up a localized string similar to CREATE TABLE IF NOT EXISTS build_report_packed_assets( - /// id INTEGER, - /// path TEXT, - /// file_header_size INTEGER, - /// PRIMARY KEY (id) - ///); - /// - ///CREATE TABLE IF NOT EXISTS build_report_source_assets( - /// id INTEGER PRIMARY KEY AUTOINCREMENT, - /// source_asset_guid TEXT NOT NULL, - /// build_time_asset_path TEXT NOT NULL, - /// UNIQUE(source_asset_guid, build_time_asset_path) - ///); - /// - ///CREATE TABLE IF NOT EXISTS build_report_packed_asset_info( - /// packed_assets_id INTEGER, - /// object_id INTEGER, - /// type INTEGER, - /// size INTEGER, - /// offset INTEGER, - /// source_asset_id INTEGER NOT NULL, - /// FOREIGN KEY (packed_assets_id) REFERENCES build_report_packed_assets(id), - /// FOREIGN KEY (source_asset_id) REFERENCES build_report_source_assets(id) - ///); - /// - ///CREATE VIEW build_report_packed_assets_view AS - ///SELECT - /// pa.id, - /// o.object_id, - /// brac.assetbundle, - /// sf.name as build_report, - /// pa.path, - /// pa.file_header_size - ///FROM build_report_packed_assets pa - ///INNER JOIN objects o ON pa.id = o.id - ///INNER JOIN serialized_files sf ON o.serialized_file = sf.id - ///LEFT JOIN objects br_obj ON o.serialized_file = br_obj.serialized_file AND br_obj.type = 1125 - ///LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.assetbundle_content; - /// - ///CREATE VIEW build_report_packed_asset_contents_view AS - ///SELECT - /// o.serialized_file, - /// pa.path, - /// pac.packed_assets_id, - /// pac.object_id, - /// pac.type, - /// pac.size, - /// pac.offset, - /// sa.source_asset_guid, - /// sa.build_time_asset_path - ///FROM build_report_packed_asset_info pac - ///LEFT JOIN build_report_packed_assets pa ON pac.packed_assets_id = pa.id - ///LEFT JOIN object_view o ON o.id = pa.id - ///LEFT JOIN build_report_source_assets sa ON pac.source_asset_id = sa.id; - ///. - /// internal static string PackedAssets { get { return ResourceManager.GetString("PackedAssets", resourceCulture); diff --git a/Analyzer/Resources/AssetBundle.sql b/Analyzer/Resources/AssetBundle.sql index ed7ae3a..b9351cb 100644 --- a/Analyzer/Resources/AssetBundle.sql +++ b/Analyzer/Resources/AssetBundle.sql @@ -1,7 +1,7 @@ -- tables related to the AssetBundle and PreloadData objects -- Do not confuse the AssetBundle Unity object (the source of much of this data) --- with the asset_bundles table, which is general to any Unity Archive. +-- with the archives table, which is general to any Unity Archive. -- The "assets" that an AssetBundle explicitly exposes: each m_Container entry of the AssetBundle -- object names an object (the addressable/asset name -> object it maps to). Populated only from @@ -34,7 +34,7 @@ SELECT FROM assetbundle_assets a INNER JOIN object_view o ON o.id = a.object; CREATE VIEW IF NOT EXISTS preload_dependencies_view AS -SELECT a.id, a.asset_name, a.asset_bundle, a.type, od.id dep_id, od.asset_bundle dep_asset_bundle, od.name dep_name, od.type dep_type +SELECT a.id, a.asset_name, a.archive, a.type, od.id dep_id, od.archive dep_archive, od.name dep_name, od.type dep_type FROM assetbundle_asset_view a INNER JOIN preload_dependencies d ON a.id = d.object INNER JOIN object_view od ON od.id = d.dependency; diff --git a/Analyzer/Resources/BuildReport.sql b/Analyzer/Resources/BuildReport.sql index eab8bb9..d25bc72 100644 --- a/Analyzer/Resources/BuildReport.sql +++ b/Analyzer/Resources/BuildReport.sql @@ -30,9 +30,9 @@ CREATE TABLE IF NOT EXISTS build_report_files( CREATE TABLE IF NOT EXISTS build_report_archive_contents( build_report_id INTEGER NOT NULL, - assetbundle TEXT NOT NULL, - assetbundle_content TEXT NOT NULL, - PRIMARY KEY (build_report_id, assetbundle_content), + archive TEXT NOT NULL, + archive_content TEXT NOT NULL, + PRIMARY KEY (build_report_id, archive_content), FOREIGN KEY (build_report_id) REFERENCES build_reports(id) ); diff --git a/Analyzer/Resources/Init.sql b/Analyzer/Resources/Init.sql index 4b74cf3..00c24d9 100644 --- a/Analyzer/Resources/Init.sql +++ b/Analyzer/Resources/Init.sql @@ -8,9 +8,7 @@ CREATE TABLE IF NOT EXISTS types -- Describes a unity archive that contains serialized files and other built content. -- A common use of the unity archive is for AssetBundles but it can also be used for -- Player, Content Archive and ContentDirectory builds. --- --- See issue 68 for proposed rename -CREATE TABLE IF NOT EXISTS asset_bundles +CREATE TABLE IF NOT EXISTS archives ( id INTEGER, name TEXT, @@ -26,12 +24,12 @@ CREATE TABLE IF NOT EXISTS asset_bundles -- "BuildPlayer-"; the Scriptable Build Pipeline / Addressables uses -- "CAB-"; the Multi-Process Build Pipeline uses "CAB-". -- * Player builds name scenes "level0", "level1", ... in scene-list order. --- asset_bundle references the row from asset_bundles table of the unity archive containing this file, +-- archive references the row from archives table of the unity archive containing this file, -- or is '' when the file is not inside an unity archive; object_view turns that '' into NULL. CREATE TABLE IF NOT EXISTS serialized_files ( id INTEGER, - asset_bundle INTEGER, + archive INTEGER, name TEXT, PRIMARY KEY (id) ); @@ -91,7 +89,7 @@ INNER JOIN property_names pn ON r.property_path = pn.id INNER JOIN property_types pt ON r.property_type = pt.id; CREATE VIEW object_view AS -SELECT o.id, o.object_id, ab.name AS asset_bundle, sf.name AS serialized_file, t.name AS type, o.name, o.game_object, o.size, +SELECT o.id, o.object_id, ab.name AS archive, sf.name AS serialized_file, t.name AS type, o.name, o.game_object, o.size, CASE WHEN size < 1024 THEN printf('%!5.1f B', size * 1.0) WHEN size >= 1024 AND size < (1024 * 1024) THEN printf('%!5.1f KB', size / 1024.0) @@ -101,7 +99,7 @@ END AS pretty_size, o.crc32 FROM objects o INNER JOIN types t ON o.type = t.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id -LEFT JOIN asset_bundles ab ON sf.asset_bundle = ab.id; +LEFT JOIN archives ab ON sf.archive = ab.id; CREATE VIEW view_breakdown_by_type AS SELECT *, @@ -128,21 +126,21 @@ END AS pretty_total_size, sum(size) AS total_size, size, pretty_size, -REPLACE(GROUP_CONCAT(DISTINCT IIF(asset_bundle IS NULL, serialized_file, asset_bundle)), ',', ',' || CHAR(13)) AS in_files +REPLACE(GROUP_CONCAT(DISTINCT IIF(archive IS NULL, serialized_file, archive)), ',', ',' || CHAR(13)) AS in_files FROM object_view GROUP BY name, type, size, crc32 HAVING instances > 1 ORDER BY size DESC, instances DESC; CREATE VIEW view_material_shader_refs AS -SELECT m.id material_id, m.name material_name, a.name material_path, m.asset_bundle material_asset_bundle, s.id shader_id, s.name shader_name, s.asset_bundle shader_asset_bundle +SELECT m.id material_id, m.name material_name, a.name material_path, m.archive material_archive, s.id shader_id, s.name shader_name, s.archive shader_archive FROM object_view m INNER JOIN refs_view r ON m.id = r.object AND r.property_path = 'm_Shader' INNER JOIN object_view s ON r.referenced_object = s.id LEFT JOIN assetbundle_assets a ON m.id = a.object; CREATE VIEW view_material_texture_refs AS -SELECT m.id material_id, m.name material_name, a.name material_path, m.asset_bundle material_asset_bundle, t.id texture_id, t.name texture_name, t.asset_bundle texture_asset_bundle +SELECT m.id material_id, m.name material_name, a.name material_path, m.archive material_archive, t.id texture_id, t.name texture_name, t.archive texture_archive FROM object_view m INNER JOIN refs_view r ON r.object = m.id AND property_type = 'Texture' INNER JOIN object_view t ON r.referenced_object = t.id @@ -156,8 +154,9 @@ INSERT INTO types (id, name) VALUES (-1, 'Scene'); -- Database schema version. Bump when the schema changes in a way that tools relying on it -- (e.g. find-refs) cannot read from an older database. 1 = normalized refs table (issue #44); -- 2 = renamed assets/asset_dependencies tables to assetbundle_assets/preload_dependencies --- (issue #82); databases produced before versioning report 0. -PRAGMA user_version = 2; +-- (issue #82); 3 = renamed asset_bundles table to archives and the asset_bundle column/alias +-- to archive (issue #68); databases produced before versioning report 0. +PRAGMA user_version = 3; PRAGMA synchronous = OFF; PRAGMA journal_mode = MEMORY; diff --git a/Analyzer/Resources/MonoScript.sql b/Analyzer/Resources/MonoScript.sql index c2f51eb..dc33152 100644 --- a/Analyzer/Resources/MonoScript.sql +++ b/Analyzer/Resources/MonoScript.sql @@ -10,7 +10,7 @@ CREATE VIEW monoscript_view AS SELECT o.id, o.object_id, - o.asset_bundle, + o.archive, o.serialized_file, m.class_name, m.namespace, @@ -21,7 +21,7 @@ CREATE VIEW script_object_view AS SELECT mb.id, mb.object_id, - mb.asset_bundle, + mb.archive, mb.serialized_file, ms.class_name, ms.namespace, diff --git a/Analyzer/Resources/PackedAssets.sql b/Analyzer/Resources/PackedAssets.sql index dd55bb0..b7f8acc 100644 --- a/Analyzer/Resources/PackedAssets.sql +++ b/Analyzer/Resources/PackedAssets.sql @@ -27,7 +27,7 @@ CREATE VIEW build_report_packed_assets_view AS SELECT pa.id, o.object_id, - brac.assetbundle, + brac.archive, pa.path, pa.file_header_size, br_obj.id as build_report_id, @@ -36,12 +36,12 @@ FROM build_report_packed_assets pa INNER JOIN objects o ON pa.id = o.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN objects br_obj ON o.serialized_file = br_obj.serialized_file AND br_obj.type = 1125 -LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.assetbundle_content; +LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.archive_content; CREATE VIEW build_report_packed_asset_contents_view AS SELECT sf.name as serialized_file, - brac.assetbundle, + brac.archive, pa.path, pac.packed_assets_id, pac.object_id, @@ -57,5 +57,5 @@ LEFT JOIN objects o ON o.id = pa.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN build_report_source_assets sa ON pac.source_asset_id = sa.id LEFT JOIN objects br_obj ON o.serialized_file = br_obj.serialized_file AND br_obj.type = 1125 -LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.assetbundle_content; +LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.archive_content; diff --git a/Analyzer/Resources/Shader.sql b/Analyzer/Resources/Shader.sql index d633744..86f2a8c 100644 --- a/Analyzer/Resources/Shader.sql +++ b/Analyzer/Resources/Shader.sql @@ -63,7 +63,7 @@ CASE WHEN sum(size) >= (1024 * 1024) AND sum(size) < (1024 * 1024 * 1024) THEN printf('%!5.1f MB', sum(size) / 1024.0 / 1024) WHEN sum(size) >= (1024 * 1024 * 1024) THEN printf('%!5.1f GB', sum(size) / 1024.0 / 1024 / 1024) END AS pretty_total_size, -sum(size) AS total_size, GROUP_CONCAT(asset_bundle, ',' || CHAR(13)) AS in_bundles +sum(size) AS total_size, GROUP_CONCAT(archive, ',' || CHAR(13)) AS in_archives FROM shader_view GROUP BY name ORDER BY total_size DESC, instances DESC; diff --git a/Analyzer/SQLite/Commands/SerializedFile/AddAssetBundle.cs b/Analyzer/SQLite/Commands/SerializedFile/AddArchive.cs similarity index 79% rename from Analyzer/SQLite/Commands/SerializedFile/AddAssetBundle.cs rename to Analyzer/SQLite/Commands/SerializedFile/AddArchive.cs index 3938e0f..3e0e5cf 100644 --- a/Analyzer/SQLite/Commands/SerializedFile/AddAssetBundle.cs +++ b/Analyzer/SQLite/Commands/SerializedFile/AddArchive.cs @@ -4,7 +4,7 @@ namespace UnityDataTools.Analyzer.SQLite.Commands.SerializedFile { /* TABLE DEFINITION: - create table asset_bundles + create table archives ( id INTEGER, name TEXT, @@ -12,9 +12,9 @@ create table asset_bundles PRIMARY KEY (id) ); */ - internal class AddAssetBundle : AbstractCommand + internal class AddArchive : AbstractCommand { - protected override string TableName => "asset_bundles"; + protected override string TableName => "archives"; protected override string DDLSource => null; diff --git a/Analyzer/SQLite/Commands/SerializedFile/AddSerializedFile.cs b/Analyzer/SQLite/Commands/SerializedFile/AddSerializedFile.cs index 00778bc..40c4ba6 100644 --- a/Analyzer/SQLite/Commands/SerializedFile/AddSerializedFile.cs +++ b/Analyzer/SQLite/Commands/SerializedFile/AddSerializedFile.cs @@ -8,7 +8,7 @@ namespace UnityDataTools.Analyzer.SQLite.Commands.SerializedFile create table serialized_files ( id INTEGER, - asset_bundle INTEGER, + archive INTEGER, name TEXT, PRIMARY KEY (id) ); @@ -22,7 +22,7 @@ internal class AddSerializedFile : AbstractCommand protected override Dictionary Fields => new() { { "id", SqliteType.Integer }, - { "asset_bundle", SqliteType.Integer }, + { "archive", SqliteType.Integer }, { "name", SqliteType.Text } }; } diff --git a/Analyzer/SQLite/Handlers/BuildReportHandler.cs b/Analyzer/SQLite/Handlers/BuildReportHandler.cs index 8535ab1..78deb0f 100644 --- a/Analyzer/SQLite/Handlers/BuildReportHandler.cs +++ b/Analyzer/SQLite/Handlers/BuildReportHandler.cs @@ -60,14 +60,14 @@ public void Init(SqliteConnection db) m_InsertArchiveContentCommand = db.CreateCommand(); m_InsertArchiveContentCommand.CommandText = @"INSERT INTO build_report_archive_contents( - build_report_id, assetbundle, assetbundle_content + build_report_id, archive, archive_content ) VALUES( - @build_report_id, @assetbundle, @assetbundle_content + @build_report_id, @archive, @archive_content )"; m_InsertArchiveContentCommand.Parameters.Add("@build_report_id", SqliteType.Integer); - m_InsertArchiveContentCommand.Parameters.Add("@assetbundle", SqliteType.Text); - m_InsertArchiveContentCommand.Parameters.Add("@assetbundle_content", SqliteType.Text); + m_InsertArchiveContentCommand.Parameters.Add("@archive", SqliteType.Text); + m_InsertArchiveContentCommand.Parameters.Add("@archive_content", SqliteType.Text); } public void Process(Context ctx, long objectId, RandomAccessReader reader, out string name, out long streamDataSize) @@ -106,12 +106,12 @@ public void Process(Context ctx, long objectId, RandomAccessReader reader, out s } // Insert archive contents mapping - foreach (var mapping in buildReport.fileListAssetBundleHelper.internalNameToArchiveMapping) + foreach (var mapping in buildReport.fileListArchiveHelper.internalNameToArchiveMapping) { m_InsertArchiveContentCommand.Transaction = ctx.Transaction; m_InsertArchiveContentCommand.Parameters["@build_report_id"].Value = objectId; - m_InsertArchiveContentCommand.Parameters["@assetbundle"].Value = mapping.Value; - m_InsertArchiveContentCommand.Parameters["@assetbundle_content"].Value = mapping.Key; + m_InsertArchiveContentCommand.Parameters["@archive"].Value = mapping.Value; + m_InsertArchiveContentCommand.Parameters["@archive_content"].Value = mapping.Key; m_InsertArchiveContentCommand.ExecuteNonQuery(); } diff --git a/Analyzer/SQLite/Handlers/ISQLiteHandler.cs b/Analyzer/SQLite/Handlers/ISQLiteHandler.cs index 2026d56..c5f8806 100644 --- a/Analyzer/SQLite/Handlers/ISQLiteHandler.cs +++ b/Analyzer/SQLite/Handlers/ISQLiteHandler.cs @@ -7,7 +7,7 @@ namespace UnityDataTools.Analyzer.SQLite.Handlers; public class Context { - public int AssetBundleId { get; init; } + public int ArchiveId { get; init; } public int SerializedFileId { get; init; } public int SceneId { get; init; } public Util.ObjectIdProvider ObjectIdProvider { get; init; } diff --git a/Analyzer/SQLite/Parsers/SerializedFileParser.cs b/Analyzer/SQLite/Parsers/SerializedFileParser.cs index e5b29e4..2b1993d 100644 --- a/Analyzer/SQLite/Parsers/SerializedFileParser.cs +++ b/Analyzer/SQLite/Parsers/SerializedFileParser.cs @@ -89,9 +89,9 @@ void ProcessFile(string file, string rootDirectory) try { - var assetBundleName = Path.GetRelativePath(rootDirectory, file); + var archiveName = Path.GetRelativePath(rootDirectory, file); - m_Writer.BeginAssetBundle(assetBundleName, new FileInfo(file).Length); + m_Writer.BeginArchive(archiveName, new FileInfo(file).Length); foreach (var node in archive.Nodes) { @@ -114,7 +114,7 @@ void ProcessFile(string file, string rootDirectory) // or 'UNIQUE constraint failed: objects.id' which can happen // if AssetBundles from different builds are being processed by a single call to Analyze // or if there is a Unity Data Tool bug. - Console.Error.WriteLine($"Error processing {node.Path} in archive {assetBundleName}"); + Console.Error.WriteLine($"Error processing {node.Path} in archive {archiveName}"); Console.Error.WriteLine(e.Message); Console.Error.WriteLine(); @@ -127,7 +127,7 @@ void ProcessFile(string file, string rootDirectory) } finally { - m_Writer.EndAssetBundle(); + m_Writer.EndArchive(); } } diff --git a/Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs b/Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs index 907212f..d36c2d5 100644 --- a/Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs +++ b/Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs @@ -16,8 +16,8 @@ public class SerializedFileSQLiteWriter : IDisposable { private HashSet m_TypeSet = new(); - private int m_CurrentAssetBundleId = -1; - private int m_NextAssetBundleId = 0; + private int m_CurrentArchiveId = -1; + private int m_NextArchiveId = 0; private bool m_SkipReferences; private bool m_SkipCrc; @@ -69,7 +69,7 @@ public class SerializedFileSQLiteWriter : IDisposable private AddReference m_AddReferenceCommand = new AddReference(); private AddPropertyName m_AddPropertyNameCommand = new AddPropertyName(); private AddPropertyType m_AddPropertyTypeCommand = new AddPropertyType(); - private AddAssetBundle m_AddAssetBundleCommand = new AddAssetBundle(); + private AddArchive m_AddArchiveCommand = new AddArchive(); private AddSerializedFile m_AddSerializedFileCommand = new AddSerializedFile(); private AddObject m_AddObjectCommand = new AddObject(); private AddType m_AddTypeCommand = new AddType(); @@ -107,7 +107,7 @@ private void CreateSQLiteCommands() m_AddReferenceCommand.CreateCommand(m_Database); m_AddPropertyNameCommand.CreateCommand(m_Database); m_AddPropertyTypeCommand.CreateCommand(m_Database); - m_AddAssetBundleCommand.CreateCommand(m_Database); + m_AddArchiveCommand.CreateCommand(m_Database); m_AddSerializedFileCommand.CreateCommand(m_Database); m_AddObjectCommand.CreateCommand(m_Database); m_AddTypeCommand.CreateCommand(m_Database); @@ -116,28 +116,28 @@ private void CreateSQLiteCommands() m_LastId = m_Database.CreateCommand(); m_LastId.CommandText = "SELECT last_insert_rowid()"; } - public void BeginAssetBundle(string name, long size) + public void BeginArchive(string name, long size) { - if (m_CurrentAssetBundleId != -1) + if (m_CurrentArchiveId != -1) { - throw new InvalidOperationException("SQLWriter.BeginAssetBundle called twice"); + throw new InvalidOperationException("SQLWriter.BeginArchive called twice"); } - m_CurrentAssetBundleId = m_NextAssetBundleId++; - m_AddAssetBundleCommand.SetValue("id", m_CurrentAssetBundleId); - m_AddAssetBundleCommand.SetValue("name", name); - m_AddAssetBundleCommand.SetValue("file_size", size); - m_AddAssetBundleCommand.ExecuteNonQuery(); + m_CurrentArchiveId = m_NextArchiveId++; + m_AddArchiveCommand.SetValue("id", m_CurrentArchiveId); + m_AddArchiveCommand.SetValue("name", name); + m_AddArchiveCommand.SetValue("file_size", size); + m_AddArchiveCommand.ExecuteNonQuery(); } - public void EndAssetBundle() + public void EndArchive() { - if (m_CurrentAssetBundleId == -1) + if (m_CurrentArchiveId == -1) { - throw new InvalidOperationException("SQLWriter.EndAssetBundle called before SQLWriter.BeginAssetBundle"); + throw new InvalidOperationException("SQLWriter.EndArchive called before SQLWriter.BeginArchive"); } - m_CurrentAssetBundleId = -1; + m_CurrentArchiveId = -1; } public void WriteSerializedFile(string relativePath, string fullPath, string containingFolder) @@ -214,7 +214,7 @@ public void WriteSerializedFile(string relativePath, string fullPath, string con Context ctx = new() { - AssetBundleId = m_CurrentAssetBundleId, + ArchiveId = m_CurrentArchiveId, SerializedFileId = serializedFileId, SceneId = sceneId, ObjectIdProvider = m_ObjectIdProvider, @@ -228,7 +228,7 @@ public void WriteSerializedFile(string relativePath, string fullPath, string con { m_AddSerializedFileCommand.SetTransaction(transaction); m_AddSerializedFileCommand.SetValue("id", serializedFileId); - m_AddSerializedFileCommand.SetValue("asset_bundle", m_CurrentAssetBundleId == -1 ? "" : m_CurrentAssetBundleId); + m_AddSerializedFileCommand.SetValue("archive", m_CurrentArchiveId == -1 ? "" : m_CurrentArchiveId); m_AddSerializedFileCommand.SetValue("name", relativePath); m_AddSerializedFileCommand.ExecuteNonQuery(); @@ -387,7 +387,7 @@ public void Dispose() } // Serialized file dispose calls - m_AddAssetBundleCommand.Dispose(); + m_AddArchiveCommand.Dispose(); m_AddSerializedFileCommand.Dispose(); m_AddReferenceCommand.Dispose(); m_AddPropertyNameCommand.Dispose(); diff --git a/Analyzer/SerializedObjects/BuildReport.cs b/Analyzer/SerializedObjects/BuildReport.cs index 16d0483..7113bf9 100644 --- a/Analyzer/SerializedObjects/BuildReport.cs +++ b/Analyzer/SerializedObjects/BuildReport.cs @@ -25,7 +25,7 @@ public class BuildReport public int BuildType { get; init; } public string BuildResult { get; init; } public List Files { get; init; } - public FileListAssetBundleHelper fileListAssetBundleHelper { get; init; } + public FileListArchiveHelper fileListArchiveHelper { get; init; } private BuildReport() { } @@ -86,7 +86,7 @@ public static BuildReport Read(RandomAccessReader reader) BuildType = summary["buildType"].GetValue(), BuildResult = GetBuildResultString(summary["buildResult"].GetValue()), Files = filesList, - fileListAssetBundleHelper = new FileListAssetBundleHelper(filesList) + fileListArchiveHelper = new FileListArchiveHelper(filesList) }; } @@ -149,17 +149,18 @@ public class BuildFile /// Helper for matching files that are inside an Unity Archive file to the file containing it. -// Currently this only applies to AssetBundle builds, which can have many output files and which use hard to understand internal file names +// This applies to AssetBundle builds and ContentDirectory builds (ContentArchive), which can have +// many output files and which use hard to understand internal file names // like "CAB-76a378bdc9304bd3c3a82de8dd97981a". // For compressed Player builds the PackedAssets reports the internal files, but the file list does not report the unity3d content, // so this code will not pick up the mapping. However because there is only a single unity3d file on most platforms this is less important -public class FileListAssetBundleHelper +public class FileListArchiveHelper { public Dictionary internalNameToArchiveMapping = new Dictionary(); - public FileListAssetBundleHelper(List files) + public FileListArchiveHelper(List files) { - CalculateAssetBundleMapping(files); + CalculateArchiveMapping(files); } /// @@ -177,17 +178,38 @@ public FileListAssetBundleHelper(List files) Result: CAB-76a378bdc9304bd3c3a82de8dd97981a.resource -> audio.bundle + + + Similarly for Archives in a content directory build: + Array[20] +... + data[1] (BuildReportFile) + path (string) content0.archive + role (string) ContentArchive + id (unsigned int) 1 + totalSize (UInt64) 441200 + flags (int) 0 + data[2] (BuildReportFile) + path (string) content0.archive/1b5ddb63f662928d24e43d5d9b8b9597.cf + role (string) ContentFile + id (unsigned int) 2 + totalSize (UInt64) 100748 + flags (int) 0 + ... + + Result: + 1b5ddb63f662928d24e43d5d9b8b9597.cf -> content0.archive */ /// - private void CalculateAssetBundleMapping(List files) + private void CalculateArchiveMapping(List files) { internalNameToArchiveMapping.Clear(); - // Track archive paths and their base filenames for AssetBundle or manifest files + // Track archive paths and their base filenames for AssetBundle, manifest or content archive files var archivePathToFileName = new Dictionary(); foreach (var file in files) { - if (file.Role == "AssetBundle" || file.Role == "ManifestAssetBundle") + if (file.Role == "AssetBundle" || file.Role == "ManifestAssetBundle" || file.Role == "ContentArchive") { var justFileName = Path.GetFileName(file.Path); archivePathToFileName[file.Path] = justFileName; diff --git a/Archive/ArchiveTool.cs b/Archive/ArchiveTool.cs index 6e1d19b..60212e8 100644 --- a/Archive/ArchiveTool.cs +++ b/Archive/ArchiveTool.cs @@ -26,7 +26,7 @@ public static int ExtractContent(FileInfo filename, DirectoryInfo outputFolder, } else if (ArchiveDetector.IsUnityArchive(path)) { - ExtractAssetBundle(filename, outputFolder, filter); + ExtractArchive(filename, outputFolder, filter); } else { @@ -56,7 +56,7 @@ public static int ListContent(FileInfo filename, OutputFormat format) } else if (ArchiveDetector.IsUnityArchive(path)) { - ListAssetBundle(filename, format); + ListArchive(filename, format); } else { @@ -356,7 +356,7 @@ static string FormatNodeFlags(uint flags) return names.Count > 0 ? string.Join(", ", names) : "None"; } - static void ExtractAssetBundle(FileInfo filename, DirectoryInfo outputFolder, string filter) + static void ExtractArchive(FileInfo filename, DirectoryInfo outputFolder, string filter) { Console.WriteLine($"Extracting files from archive: {filename}"); using var archive = UnityFileSystem.MountArchive(filename.FullName, "/"); @@ -377,7 +377,7 @@ static void ExtractAssetBundle(FileInfo filename, DirectoryInfo outputFolder, st Console.WriteLine($"Extracted {extracted} out of {total} files."); } - static void ListAssetBundle(FileInfo filename, OutputFormat format) + static void ListArchive(FileInfo filename, OutputFormat format) { if (!ArchiveDetector.TryReadArchiveHeader(filename.FullName, out var header, out var errorMessage)) throw new NotSupportedException(errorMessage); diff --git a/Documentation/analyze-examples.md b/Documentation/analyze-examples.md index 67a5523..439baf5 100644 --- a/Documentation/analyze-examples.md +++ b/Documentation/analyze-examples.md @@ -89,13 +89,13 @@ Then provide that file as context, prior to asking it to write queries based on If you want to find out which AssetBundles in a build contain a certain object type you can try a query like this: ``` -sqlite3 Analysis.db "SELECT DISTINCT asset_bundle FROM object_view WHERE type = 'MonoBehaviour';" +sqlite3 Analysis.db "SELECT DISTINCT archive FROM object_view WHERE type = 'MonoBehaviour';" ``` The above query takes advantage of the object_view which pulls together the data from multiple tables. The following query does exactly the same thing, but uses the underlying tables directly: ``` -sqlite3 Analysis.db "SELECT DISTINCT ab.name AS asset_bundle FROM objects o INNER JOIN types t ON o.type = t.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN asset_bundles ab ON sf.asset_bundle = ab.id WHERE t.name = 'MonoBehaviour';" +sqlite3 Analysis.db "SELECT DISTINCT ab.name AS archive FROM objects o INNER JOIN types t ON o.type = t.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN archives ab ON sf.archive = ab.id WHERE t.name = 'MonoBehaviour';" ``` Note: Both MonoBehaviours and ScriptableObjects have the same serialized type "MonoBehaviour". @@ -133,7 +133,7 @@ The `script_object_view` provides a convenient way to query MonoBehaviour object For example, to search for all instances of the class SpriteSkin in the UnityEngine.U2D.Animation namespace, you can simply query: ``` -SELECT asset_bundle, serialized_file, name, object_id, class_name, namespace, assembly_name +SELECT archive, serialized_file, name, object_id, class_name, namespace, assembly_name FROM script_object_view WHERE class_name = 'SpriteSkin' AND namespace = 'UnityEngine.U2D.Animation'; @@ -142,7 +142,7 @@ WHERE class_name = 'SpriteSkin' If the class name is unique in your project, you can simplify the query by omitting the namespace filter: ``` -SELECT asset_bundle, serialized_file, name, object_id, class_name, namespace +SELECT archive, serialized_file, name, object_id, class_name, namespace FROM script_object_view WHERE class_name = 'SpriteSkin'; ``` @@ -150,7 +150,7 @@ WHERE class_name = 'SpriteSkin'; Alternatively, you can write the query manually using the underlying tables: ``` -SELECT mb.asset_bundle, mb.serialized_file, mb.name, mb.object_id +SELECT mb.archive, mb.serialized_file, mb.name, mb.object_id FROM object_view mb INNER JOIN refs_view r ON mb.id = r.object INNER JOIN monoscript_view ms ON r.referenced_object = ms.id diff --git a/Documentation/analyzer.md b/Documentation/analyzer.md index c3cb057..271e94c 100644 --- a/Documentation/analyzer.md +++ b/Documentation/analyzer.md @@ -13,21 +13,24 @@ Once generated, a tool such as the [DB Browser for SQLite](https://sqlitebrowser See [this topic](analyze-examples.md) for examples of how to use the SQLite output of the UnityDataTool Analyze command. -# DataBase Reference +# Database Schema Reference -The database provides different views. The views join multiple tables together and often it is not necessary to write your own SQL queries to find the information you want, especially when you are using a visual SQLite tool. +The database provides different tables and views. The views join multiple tables together to provide useful presentations of the data. With GUI-based SQLite tools it is often possible to skip writing your own SQL queries, and simply view the content of these pre-defined queries. -This section gives an overview of the main views. +This section gives an overview of the main tables and views. ## object_view -This is the main view where the information about all the objects in the AssetBundles is available. +This is the main view, providing information about all the objects in the analyzed build output. +That output could be AssetBundles, a ContentDirectory build, a Player build, or standalone +SerializedFiles. Its columns are: * id: a unique id without any meaning outside of the database -* object_id: the Unity object id (unique inside its SerializedFile but not necessarily acros all - AssetBundles) -* asset_bundle: the name of the AssetBundle containing the object (will be null if the source file - was a SerializedFile and not an AssetBundle) +* object_id: the Unity object id (unique inside its SerializedFile but not necessarily across all + the files in the build) +* archive: the name of the Unity Archive containing the object (will be null if the source file + was a bare SerializedFile and not inside an archive). Archives back AssetBundles, ContentDirectory + builds and Player builds. * serialized_file: the name of the SerializedFile containing the object * type: the type of the object * name: the name of the object, if it had one @@ -35,6 +38,12 @@ Its columns are: * size: the size of the object in bytes (e.g. 3343772) * pretty_size: the size in an easier to read format (e.g. 3.2 MB) +## archives + +One row per Unity Archive encountered during analysis, holding the archive file's `name` and +`file_size`. AssetBundle files are recorded here. Compressed Player and other builds may also have content inside archive files. Each SerializedFile links to its archive through the `serialized_files.archive` +column, and `object_view` surfaces the archive name as its `archive` column. A bare SerializedFile that is not inside an archive has no row here. + ## view_breakdown_by_type This view lists the total number and size of the objects, aggregated by type. diff --git a/Documentation/assetbundle-format.md b/Documentation/assetbundle-format.md index a690be9..15f0620 100644 --- a/Documentation/assetbundle-format.md +++ b/Documentation/assetbundle-format.md @@ -19,6 +19,15 @@ package builds its content as AssetBundles too, so the same layout applies there An AssetBundle always contains at least one SerializedFile, and may contain auxiliary files such as `.resS` (Textures and Meshes) and `.resource` (audio/video). +Because a bundle is just an archive, `analyze` records it in the generic `archives` table rather than +anything AssetBundle-specific: one row per bundle file (its name and size), and every SerializedFile +inside it points back through `serialized_files.archive`. In query results this surfaces as the +`archive` column of `object_view` (the containing bundle's name, or NULL for a bare SerializedFile). +The same table and column also represent Player and ContentDirectory archives, so a query written +against `archive` works across all of them. Data that is genuinely specific to the AssetBundle *object* +lives in the separate `assetbundle_assets` / `preload_dependencies` tables (see +[How `analyze` represents this](#how-analyze-represents-this)). + ### SerializedFile names inside a bundle The names of the SerializedFiles inside a bundle are technical and hash-based. You do not need to diff --git a/Documentation/buildreport.md b/Documentation/buildreport.md index 893127e..17f45f2 100644 --- a/Documentation/buildreport.md +++ b/Documentation/buildreport.md @@ -36,7 +36,7 @@ WHERE build_time_asset_path like "Assets/Sprites/Snow.jpg" 3. Show the AssetBundles that contain content from "Assets/Sprites/Snow.jpg". ``` -SELECT DISTINCT assetbundle +SELECT DISTINCT archive FROM build_report_packed_asset_contents_view WHERE build_time_asset_path like "Assets/Sprites/Snow.jpg" ``` @@ -200,12 +200,12 @@ Build report data is stored in the following tables and views: |------|------|-------------| | `build_reports` | table | Build summary (type, result, platform, duration, etc.) | | `build_report_files` | table | Files included in the build (path, role, size). See [BuildReport.GetFiles](https://docs.unity3d.com/ScriptReference/Build.Reporting.BuildReport.GetFiles.html) | -| `build_report_archive_contents` | table | Files inside each AssetBundle | +| `build_report_archive_contents` | table | Files inside each Unity Archive (AssetBundle or ContentArchive) | | `build_report_packed_assets` | table | SerializedFile, .resS, or .resource file info. See [PackedAssets](https://docs.unity3d.com/ScriptReference/Build.Reporting.PackedAssets.html) | | `build_report_packed_asset_info` | table | Each object inside a SerializedFile (or data in .resS/.resource files). See [PackedAssetInfo](https://docs.unity3d.com/ScriptReference/Build.Reporting.PackedAssetInfo.html) | | `build_report_source_assets` | table | Source asset GUID and path for each PackedAssetInfo reference | | `build_report_files_view` | view | All files from all build reports | -| `build_report_packed_assets_view` | view | All PackedAssets with their BuildReport, AssetBundle, and SerializedFile | +| `build_report_packed_assets_view` | view | All PackedAssets with their BuildReport, Archive, and SerializedFile | | `build_report_packed_asset_contents_view` | view | All objects and resources tracked in build reports | The `build_reports` table contains primary build information. Additional tables store detailed content data. Views simplify queries by automatically joining tables, especially when working with multiple build reports. @@ -230,14 +230,14 @@ Views automatically identify which build report each row belongs to, simplifying This view demonstrates key relationships: - Finds the BuildReport object (`br_obj`) by type (1125) and shared `serialized_file` with the PackedAssets (`pa`) - Retrieves the serialized file name from `serialized_files` table (`sf.name`) -- For AssetBundle builds, retrieves the AssetBundle name from `build_report_archive_contents` by matching BuildReport ID and PackedAssets path (`assetbundle` is NULL for Player builds) +- For archive-based builds (AssetBundle, ContentDirectory), retrieves the archive name from `build_report_archive_contents` by matching BuildReport ID and PackedAssets path (`archive` is NULL for Player builds) ``` CREATE VIEW build_report_packed_assets_view AS SELECT pa.id, o.object_id, - brac.assetbundle, + brac.archive, pa.path, pa.file_header_size, br_obj.id as build_report_id, @@ -246,7 +246,7 @@ FROM build_report_packed_assets pa INNER JOIN objects o ON pa.id = o.id INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN objects br_obj ON o.serialized_file = br_obj.serialized_file AND br_obj.type = 1125 -LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.assetbundle_content; +LEFT JOIN build_report_archive_contents brac ON br_obj.id = brac.build_report_id AND pa.path = brac.archive_content; ``` ### Column Naming diff --git a/Documentation/command-find-refs.md b/Documentation/command-find-refs.md index b2ec988..e2e26fe 100644 --- a/Documentation/command-find-refs.md +++ b/Documentation/command-find-refs.md @@ -73,12 +73,12 @@ The output shows the reference chain from root assets to your target object: Reference chains to ID: 1234 Type: Transform - AssetBundle: asset_bundle_name + Archive: archive_name SerializedFile: CAB-353837edf22eb1c4d651c39d27a233b7 Found reference in: MyPrefab.prefab -(AssetBundle = MyAssetBundle; SerializedFile = CAB-353837edf22eb1c4d651c39d27a233b7) +(Archive = MyAssetBundle; SerializedFile = CAB-353837edf22eb1c4d651c39d27a233b7) GameObject (id=1348) MyPrefab ↓ m_Component.Array[0].component RectTransform (id=721) [Component of MyPrefab (id=1348)] diff --git a/Documentation/comparing-builds.md b/Documentation/comparing-builds.md index b13e862..85a70a5 100644 --- a/Documentation/comparing-builds.md +++ b/Documentation/comparing-builds.md @@ -88,7 +88,7 @@ The [comparebuilds.ps1](../Scripts/comparebuilds.ps1) script is an example Power ``` -asset_bundle object_id type name status size_build1 size_build2 crc32_build1 crc32_build2 +archive object_id type name status size_build1 size_build2 crc32_build1 crc32_build2 ------------------------------------------------------------ -------------------- ------------- --------------------------------------------------- --------- ----------- ----------- ------------ ------------ cee5ebdcaa450bf0baa84e3f6fc812e5_monoscripts_d8d9cc26b795c2d 1 AssetBundle cee5ebdcaa450bf0baa84e3f6fc812e5_monoscripts.bundle Same 164 164 3099751197 3099751197 97b5823f9e593f7d3.bundle @@ -199,7 +199,7 @@ This is a truncated example output: ``` -asset_bundle object_id type name status size_build1 size_build2 crc32_build1 crc32_build2 +archive object_id type name status size_build1 size_build2 crc32_build1 crc32_build2 -------------- -------------------- ------------------- ------------------- --------- ----------- ----------- ------------ ------------ AssetBundles 1 AssetBundle Same 104 104 241569179 241569179 AssetBundles 2 AssetBundleManifest AssetBundleManifest Different 184 184 4124235088 3102991602 diff --git a/Documentation/referencefinder.md b/Documentation/referencefinder.md index 9231c32..5cc7b76 100644 --- a/Documentation/referencefinder.md +++ b/Documentation/referencefinder.md @@ -26,12 +26,12 @@ The content of the output file looks like this: Reference chains to ID: 1234 Type: Transform - AssetBundle: asset_bundle_name + Archive: archive_name SerializedFile: CAB-353837edf22eb1c4d651c39d27a233b7 Found reference in: MyPrefab.prefab - (AssetBundle = MyAssetBundle; SerializedFile = CAB-353837edf22eb1c4d651c39d27a233b7) + (Archive = MyAssetBundle; SerializedFile = CAB-353837edf22eb1c4d651c39d27a233b7) GameObject (id=1348) MyPrefab ↓ m_Component.Array[0].component RectTransform (id=721) [Component of MyPrefab (id=1348)] diff --git a/ReferenceFinder/ReferenceFinderTool.cs b/ReferenceFinder/ReferenceFinderTool.cs index 80fa580..4903b62 100644 --- a/ReferenceFinder/ReferenceFinderTool.cs +++ b/ReferenceFinder/ReferenceFinderTool.cs @@ -174,7 +174,7 @@ FROM object_view o for (int i = 0; i < objectIds.Count; ++i) { var command = db.CreateCommand(); - command.CommandText = "SELECT name, type, asset_bundle, serialized_file FROM object_view WHERE id = @id"; + command.CommandText = "SELECT name, type, archive, serialized_file FROM object_view WHERE id = @id"; command.Parameters.AddWithValue("@id", objectIds[i]); using (var reader = command.ExecuteReader()) @@ -184,14 +184,14 @@ FROM object_view o m_Writer.WriteLine($"Reference chains to {(reader.IsDBNull(0) ? "" : reader.GetString(0))}"); m_Writer.WriteLine($" ID: {objectIds[i]}"); m_Writer.WriteLine($" Type: {reader.GetString(1)}"); - m_Writer.WriteLine($" AssetBundle: {(reader.IsDBNull(2) ? "" : reader.GetString(2))}"); + m_Writer.WriteLine($" Archive: {(reader.IsDBNull(2) ? "" : reader.GetString(2))}"); m_Writer.WriteLine($" SerializedFile: {reader.GetString(3)}"); m_Writer.WriteLine(); } ProcessReferences(objectIds[i], findAll); - command.CommandText = "SELECT asset_name, asset_bundle, serialized_file FROM assetbundle_asset_view WHERE id = @id"; + command.CommandText = "SELECT asset_name, archive, serialized_file FROM assetbundle_asset_view WHERE id = @id"; foreach (var root in m_Roots) { @@ -203,7 +203,7 @@ FROM object_view o m_Writer.WriteLine("Found reference in:"); m_Writer.WriteLine(reader.GetString(0)); - m_Writer.WriteLine($"(AssetBundle = {reader.GetString(1)}; SerializedFile = {reader.GetString(2)})"); + m_Writer.WriteLine($"(Archive = {reader.GetString(1)}; SerializedFile = {reader.GetString(2)})"); } OutputReferenceNode(root, "", 1); diff --git a/Scripts/comparebuilds.ps1 b/Scripts/comparebuilds.ps1 index 789830b..6bc162c 100644 --- a/Scripts/comparebuilds.ps1 +++ b/Scripts/comparebuilds.ps1 @@ -39,13 +39,13 @@ $query = @" ATTACH DATABASE '$db2' AS db2; SELECT - COALESCE(o1.asset_bundle, o2.asset_bundle) AS asset_bundle, + COALESCE(o1.archive, o2.archive) AS archive, COALESCE(o1.object_id, o2.object_id) AS object_id, COALESCE(o1.type, o2.type) AS type, COALESCE(o1.name, o2.name) AS name, CASE - WHEN o1.asset_bundle IS NULL THEN 'Only in Build 1' - WHEN o2.asset_bundle IS NULL THEN 'Only in Build 2' + WHEN o1.archive IS NULL THEN 'Only in Build 1' + WHEN o2.archive IS NULL THEN 'Only in Build 2' WHEN o1.crc32 != o2.crc32 OR o1.size != o2.size THEN 'Different' ELSE 'Same' END AS status, @@ -55,7 +55,7 @@ SELECT o2.crc32 AS crc32_build2 FROM ( SELECT - ab.name AS asset_bundle, + ab.name AS archive, o.object_id, t.name AS type, o.name, @@ -69,11 +69,11 @@ FROM ( INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN - asset_bundles ab ON sf.asset_bundle = ab.id + archives ab ON sf.archive = ab.id ) AS o1 FULL OUTER JOIN ( SELECT - ab.name AS asset_bundle, + ab.name AS archive, o.object_id, t.name AS type, o.name, @@ -87,7 +87,7 @@ FULL OUTER JOIN ( INNER JOIN db2.serialized_files sf ON o.serialized_file = sf.id LEFT JOIN - db2.asset_bundles ab ON sf.asset_bundle = ab.id + db2.archives ab ON sf.archive = ab.id ) AS o2 ON o1.object_id = o2.object_id AND o1.type = o2.type AND o1.name = o2.name diff --git a/Scripts/comparebundles.ps1 b/Scripts/comparebundles.ps1 index ca18343..782cff6 100644 --- a/Scripts/comparebundles.ps1 +++ b/Scripts/comparebundles.ps1 @@ -62,8 +62,8 @@ SELECT COALESCE(o1.type, o2.type) AS type, COALESCE(o1.name, o2.name) AS name, CASE - WHEN o1.asset_bundle IS NULL THEN 'Only in Build 1' - WHEN o2.asset_bundle IS NULL THEN 'Only in Build 2' + WHEN o1.archive IS NULL THEN 'Only in Build 1' + WHEN o2.archive IS NULL THEN 'Only in Build 2' ELSE 'Different' END AS status, o1.size AS size_build1, @@ -72,7 +72,7 @@ SELECT o2.crc32 AS crc32_build2 FROM ( SELECT - ab.name AS asset_bundle, + ab.name AS archive, o.object_id, t.name AS type, o.name, @@ -86,11 +86,11 @@ FROM ( INNER JOIN serialized_files sf ON o.serialized_file = sf.id LEFT JOIN - asset_bundles ab ON sf.asset_bundle = ab.id + archives ab ON sf.archive = ab.id ) AS o1 FULL OUTER JOIN ( SELECT - ab.name AS asset_bundle, + ab.name AS archive, o.object_id, t.name AS type, o.name, @@ -104,10 +104,10 @@ FULL OUTER JOIN ( INNER JOIN db2.serialized_files sf ON o.serialized_file = sf.id LEFT JOIN - db2.asset_bundles ab ON sf.asset_bundle = ab.id + db2.archives ab ON sf.archive = ab.id ) AS o2 ON o1.serialized_file = o2.serialized_file AND o1.object_id = o2.object_id -WHERE NOT (o1.asset_bundle IS NOT NULL AND o2.asset_bundle IS NOT NULL AND o1.crc32 = o2.crc32 AND o1.size = o2.size); +WHERE NOT (o1.archive IS NOT NULL AND o2.archive IS NOT NULL AND o1.crc32 = o2.crc32 AND o1.size = o2.size); DETACH DATABASE db2; "@ diff --git a/UnityDataTool.Tests/AddressablesBuildLayoutTests.cs b/UnityDataTool.Tests/AddressablesBuildLayoutTests.cs index 6ad551e..fd70835 100644 --- a/UnityDataTool.Tests/AddressablesBuildLayoutTests.cs +++ b/UnityDataTool.Tests/AddressablesBuildLayoutTests.cs @@ -62,7 +62,7 @@ public async Task Analyze_BuildLayout_ContainsExpectedSQLContent() "Unexpected size for specific AssetBundle in build 2"); SQLTestHelper.AssertQueryString(db, "SELECT packing_mode FROM addressables_build_groups WHERE build_id = 1 and name = \"SamplePack1\"", "PackSeparately", "Unexpected packing_mode for group"); - SQLTestHelper.AssertQueryInt(db, "SELECT COUNT(*) FROM asset_bundles", 0, + SQLTestHelper.AssertQueryInt(db, "SELECT COUNT(*) FROM archives", 0, "Expected no AssetBundles found in reference folder"); } } diff --git a/UnityDataTool.Tests/BuildReportTests.cs b/UnityDataTool.Tests/BuildReportTests.cs index 8f1549e..c9f7def 100644 --- a/UnityDataTool.Tests/BuildReportTests.cs +++ b/UnityDataTool.Tests/BuildReportTests.cs @@ -76,7 +76,7 @@ public async Task Analyze_BuildReport_ContainsExpected_ObjectInfo( Assert.That(ttlObjCount, Is.GreaterThanOrEqualTo(1+ packedAssetCount + 1), "Unexpected number of objects in BuildReport analysis"); - SQLTestHelper.AssertQueryInt(db, "SELECT COUNT(*) FROM asset_bundles", 0, + SQLTestHelper.AssertQueryInt(db, "SELECT COUNT(*) FROM archives", 0, "Expected no AssetBundles found in reference folder"); // @@ -139,9 +139,9 @@ public async Task Analyze_BuildReport_ContainsExpected_ObjectInfo( SQLTestHelper.AssertQueryString(db, "SELECT name FROM serialized_files WHERE id = 0", "AssetBundle.buildreport", "Unexpected serialized file name"); - // Verify asset_bundle column is empty/NULL for BuildReport files (they are not asset bundles) - var assetBundleValue = SQLTestHelper.QueryString(db, "SELECT COALESCE(asset_bundle, '') FROM serialized_files WHERE id = 0"); - Assert.That(string.IsNullOrEmpty(assetBundleValue), "BuildReport serialized file should not have asset_bundle value"); + // Verify archive column is empty/NULL for BuildReport files (they are not inside an archive) + var archiveValue = SQLTestHelper.QueryString(db, "SELECT COALESCE(archive, '') FROM serialized_files WHERE id = 0"); + Assert.That(string.IsNullOrEmpty(archiveValue), "BuildReport serialized file should not have archive value"); // Verify the serialized file name matches what we see in object_view var serializedFileName = SQLTestHelper.QueryString(db, "SELECT name FROM serialized_files WHERE id = 0"); @@ -467,8 +467,8 @@ public async Task Analyze_BuildReports_BothReports_ContainsBuildReportFilesData( var spritesArchiveContentCount = SQLTestHelper.QueryInt(db, $@"SELECT COUNT(*) FROM build_report_archive_contents WHERE build_report_id = {assetBundleReportId} - AND assetbundle = 'sprites.bundle' - AND assetbundle_content = 'CAB-6b49068aebcf9d3b05692c8efd933167.resS'"); + AND archive = 'sprites.bundle' + AND archive_content = 'CAB-6b49068aebcf9d3b05692c8efd933167.resS'"); Assert.AreEqual(1, spritesArchiveContentCount, "Expected to find mapping for sprites.bundle -> CAB-6b49068aebcf9d3b05692c8efd933167.resS"); @@ -478,31 +478,31 @@ public async Task Analyze_BuildReports_BothReports_ContainsBuildReportFilesData( Assert.AreEqual(0, playerArchiveContentsCount, "Expected Player BuildReport to have no archive contents mappings"); - // Verify build_report_packed_assets_view includes assetbundle column + // Verify build_report_packed_assets_view includes archive column var packedAssetsWithBundle = SQLTestHelper.QueryInt(db, @"SELECT COUNT(*) FROM build_report_packed_assets_view - WHERE assetbundle IS NOT NULL"); + WHERE archive IS NOT NULL"); Assert.That(packedAssetsWithBundle, Is.GreaterThan(0), - "Expected some PackedAssets to have assetbundle name populated"); + "Expected some PackedAssets to have archive name populated"); - // Verify specific PackedAsset has correct assetbundle name + // Verify specific PackedAsset has correct archive name var specificPackedAssetBundle = SQLTestHelper.QueryString(db, - @"SELECT assetbundle FROM build_report_packed_assets_view + @"SELECT archive FROM build_report_packed_assets_view WHERE path = 'CAB-6b49068aebcf9d3b05692c8efd933167'"); Assert.AreEqual("sprites.bundle", specificPackedAssetBundle, - "Expected PackedAsset CAB-6b49068aebcf9d3b05692c8efd933167 to have assetbundle 'sprites.bundle'"); + "Expected PackedAsset CAB-6b49068aebcf9d3b05692c8efd933167 to have archive 'sprites.bundle'"); - // Verify PackedAssets from Player build have NULL assetbundle + // Verify PackedAssets from Player build have NULL archive var playerPackedAssetsWithNullBundle = SQLTestHelper.QueryInt(db, @"SELECT COUNT(*) FROM build_report_packed_assets_view - WHERE build_report_filename = 'Player.buildreport' AND assetbundle IS NULL"); + WHERE build_report_filename = 'Player.buildreport' AND archive IS NULL"); Assert.That(playerPackedAssetsWithNullBundle, Is.GreaterThan(0), - "Expected PackedAssets from Player.buildreport to have NULL assetbundle"); + "Expected PackedAssets from Player.buildreport to have NULL archive"); var playerPackedAssetsWithNonNullBundle = SQLTestHelper.QueryInt(db, @"SELECT COUNT(*) FROM build_report_packed_assets_view - WHERE build_report_filename = 'Player.buildreport' AND assetbundle IS NOT NULL"); + WHERE build_report_filename = 'Player.buildreport' AND archive IS NOT NULL"); Assert.AreEqual(0, playerPackedAssetsWithNonNullBundle, - "Expected all PackedAssets from Player.buildreport have NULL assetbundle"); + "Expected all PackedAssets from Player.buildreport have NULL archive"); } } diff --git a/UnityDataTool.Tests/ExpectedData/2019.4.0f1/ExpectedValues.json b/UnityDataTool.Tests/ExpectedData/2019.4.0f1/ExpectedValues.json index 6bac39b..e84d145 100644 --- a/UnityDataTool.Tests/ExpectedData/2019.4.0f1/ExpectedValues.json +++ b/UnityDataTool.Tests/ExpectedData/2019.4.0f1/ExpectedValues.json @@ -11,7 +11,7 @@ "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Size": 5248, "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Flags": 0, "animation_clips_count": 2, - "asset_bundles_count": 2, + "archives_count": 2, "assets_count": 25, "audio_clips_count": 1, "meshes_count": 7, diff --git a/UnityDataTool.Tests/ExpectedData/2020.3.0f1/ExpectedValues.json b/UnityDataTool.Tests/ExpectedData/2020.3.0f1/ExpectedValues.json index 1d9f660..88a2094 100644 --- a/UnityDataTool.Tests/ExpectedData/2020.3.0f1/ExpectedValues.json +++ b/UnityDataTool.Tests/ExpectedData/2020.3.0f1/ExpectedValues.json @@ -11,7 +11,7 @@ "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Size": 5248, "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Flags": 0, "animation_clips_count": 2, - "asset_bundles_count": 2, + "archives_count": 2, "assets_count": 25, "audio_clips_count": 1, "meshes_count": 7, diff --git a/UnityDataTool.Tests/ExpectedData/2021.3.0f1/ExpectedValues.json b/UnityDataTool.Tests/ExpectedData/2021.3.0f1/ExpectedValues.json index 6407195..9f000fa 100644 --- a/UnityDataTool.Tests/ExpectedData/2021.3.0f1/ExpectedValues.json +++ b/UnityDataTool.Tests/ExpectedData/2021.3.0f1/ExpectedValues.json @@ -11,7 +11,7 @@ "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Size": 5248, "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Flags": 0, "animation_clips_count": 2, - "asset_bundles_count": 2, + "archives_count": 2, "assets_count": 25, "audio_clips_count": 1, "meshes_count": 7, diff --git a/UnityDataTool.Tests/ExpectedData/2022.1.20f1/ExpectedValues.json b/UnityDataTool.Tests/ExpectedData/2022.1.20f1/ExpectedValues.json index 9c873eb..b0abe58 100644 --- a/UnityDataTool.Tests/ExpectedData/2022.1.20f1/ExpectedValues.json +++ b/UnityDataTool.Tests/ExpectedData/2022.1.20f1/ExpectedValues.json @@ -11,7 +11,7 @@ "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Size": 5248, "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Flags": 0, "animation_clips_count": 2, - "asset_bundles_count": 2, + "archives_count": 2, "assets_count": 25, "audio_clips_count": 1, "meshes_count": 7, diff --git a/UnityDataTool.Tests/ExpectedData/2023.1.0a16/ExpectedValues.json b/UnityDataTool.Tests/ExpectedData/2023.1.0a16/ExpectedValues.json index 506fe8c..fad41fc 100644 --- a/UnityDataTool.Tests/ExpectedData/2023.1.0a16/ExpectedValues.json +++ b/UnityDataTool.Tests/ExpectedData/2023.1.0a16/ExpectedValues.json @@ -11,7 +11,7 @@ "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Size": 5248, "CAB-5d40f7cad7c871cf2ad2af19ac542994.resource-Flags": 0, "animation_clips_count": 2, - "asset_bundles_count": 2, + "archives_count": 2, "assets_count": 25, "audio_clips_count": 1, "meshes_count": 7, diff --git a/UnityDataTool.Tests/ExpectedDataGenerator.cs b/UnityDataTool.Tests/ExpectedDataGenerator.cs index 9582eb5..c5b5a29 100644 --- a/UnityDataTool.Tests/ExpectedDataGenerator.cs +++ b/UnityDataTool.Tests/ExpectedDataGenerator.cs @@ -37,7 +37,7 @@ public static void Generate(Context context) cmd.CommandText = @"SELECT (SELECT COUNT(*) FROM animation_clips), - (SELECT COUNT(*) FROM asset_bundles), + (SELECT COUNT(*) FROM archives), (SELECT COUNT(*) FROM assetbundle_assets), (SELECT COUNT(*) FROM audio_clips), (SELECT COUNT(*) FROM meshes), @@ -57,7 +57,7 @@ public static void Generate(Context context) reader.Read(); expectedData.Add("animation_clips_count", reader.GetInt32(0)); - expectedData.Add("asset_bundles_count", reader.GetInt32(1)); + expectedData.Add("archives_count", reader.GetInt32(1)); expectedData.Add("assets_count", reader.GetInt32(2)); expectedData.Add("audio_clips_count", reader.GetInt32(3)); expectedData.Add("meshes_count", reader.GetInt32(4)); diff --git a/UnityDataTool.Tests/UnityDataToolAssetBundleTests.cs b/UnityDataTool.Tests/UnityDataToolAssetBundleTests.cs index f814a95..c11fb3d 100644 --- a/UnityDataTool.Tests/UnityDataToolAssetBundleTests.cs +++ b/UnityDataTool.Tests/UnityDataToolAssetBundleTests.cs @@ -328,7 +328,7 @@ private void ValidateDatabase(string databasePath, bool withRefs) cmd.CommandText = @"SELECT (SELECT COUNT(*) FROM animation_clips), - (SELECT COUNT(*) FROM asset_bundles), + (SELECT COUNT(*) FROM archives), (SELECT COUNT(*) FROM assetbundle_assets), (SELECT COUNT(*) FROM audio_clips), (SELECT COUNT(*) FROM meshes), @@ -347,7 +347,7 @@ private void ValidateDatabase(string databasePath, bool withRefs) reader.Read(); Assert.AreEqual(Context.ExpectedData.Get("animation_clips_count"), reader.GetInt32(0)); - Assert.AreEqual(Context.ExpectedData.Get("asset_bundles_count"), reader.GetInt32(1)); + Assert.AreEqual(Context.ExpectedData.Get("archives_count"), reader.GetInt32(1)); Assert.AreEqual(Context.ExpectedData.Get("assets_count"), reader.GetInt32(2)); Assert.AreEqual(Context.ExpectedData.Get("audio_clips_count"), reader.GetInt32(3)); Assert.AreEqual(Context.ExpectedData.Get("meshes_count"), reader.GetInt32(4)); diff --git a/UnityDataTool.Tests/UnityDataToolPlayerDataTests.cs b/UnityDataTool.Tests/UnityDataToolPlayerDataTests.cs index 686a6f5..dc65ce5 100644 --- a/UnityDataTool.Tests/UnityDataToolPlayerDataTests.cs +++ b/UnityDataTool.Tests/UnityDataToolPlayerDataTests.cs @@ -50,7 +50,7 @@ public async Task Analyze_PlayerData_DatabaseCorrect() cmd.CommandText = @"SELECT - (SELECT COUNT(*) FROM asset_bundles), + (SELECT COUNT(*) FROM archives), (SELECT COUNT(*) FROM assetbundle_assets), (SELECT COUNT(*) FROM objects), (SELECT COUNT(*) FROM refs),