You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Analyzer/Resources/AddrBuildBundles.sql
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,4 +19,4 @@ CREATE TABLE IF NOT EXISTS addr_build_bundles
19
19
PRIMARY KEY (id, build_id)
20
20
);
21
21
22
-
CREATEVIEWIF NOT EXISTS addr_build_cached_bundles ASSELECT build_id, concat(internal_name, '.bundle') AS cached_name, name AScatalog_nameFROM addr_build_bundles;
22
+
CREATEVIEWIF NOT EXISTS addr_build_cached_bundles ASSELECT build_id, concat(internal_name, '.bundle') AS cached_name, name ASname_in_catalogFROM addr_build_bundles;
Copy file name to clipboardExpand all lines: Documentation/addressables-build-reports.md
+62-42Lines changed: 62 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,37 @@ Unity Data Tools provides the ability to analyse Unity Addressables build report
6
6
7
7
When you run the analyzer on a directory containing Addressables build reports, the tool will parse them and add the data to the sqlite database.
8
8
9
+
Each build report is generated a unique id that is used as the id in addr_builds and build_id field in subsequent tables. This allows you to compare builds against each other.
10
+
9
11
## Database Schema
10
12
11
13
The Addressables build data is stored across multiple related tables in the SQLite database:
12
14
13
15
## Concepts
14
16
15
-
**Builds** - a build corresponds to a content build. This can be part of a player build, or standalone through the Addressables groups window
16
-
**Bundles** - asset bundles that are output by the build.
17
-
**Groups** - groups in the Addressable Groups window whose settings generate one or more Asset Bundles
18
-
**Schemas** - settings for groups that determine how bundles are generated
19
-
**Files** - the file in the asset bundle that contains serialized files
20
-
**SubFiles** - files that are bundled in the asset bundle, but not stored with the rest of the serialized files (resS, scene sharedAssets)
21
-
**Explicit Assets** - these are assets that have had the Addressable checkbox checked in the Editor
22
-
**Other Assets** - these are assets that are included because an explicit asset depends upon them
17
+
**Builds**
18
+
: a build corresponds to a content build. This can be part of a player build, or standalone through the Addressables groups window
19
+
20
+
**Bundles**
21
+
: asset bundles that are output by the build.
22
+
23
+
**Groups**
24
+
: groups in the Addressable Groups window whose settings generate one or more Asset Bundles
25
+
26
+
**Schemas**
27
+
: settings for groups that determine how bundles are generated
28
+
29
+
**Files**
30
+
: the file in the asset bundle that contains serialized files
31
+
32
+
**SubFiles**
33
+
: files that are bundled in the asset bundle, but not stored with the rest of the serialized files (resS, scene sharedAssets)
34
+
35
+
**Explicit Assets**
36
+
: these are assets that have had the Addressable checkbox checked in the Editor
37
+
38
+
**Other Assets**
39
+
: these are assets that are included because an explicit asset depends upon them
23
40
24
41
### Core Tables
25
42
@@ -47,7 +64,7 @@ Contains key value pairs of schema settings at time of build.
47
64
#### `addr_build_bundles`
48
65
Bundle-level information including asset counts and file sizes.
49
66
50
-
#### `addr_build_bundle_dependent_bundles
67
+
#### `addr_build_bundle_dependent_bundles`
51
68
Maps bundles to the bundles they depend upon (dependent bundles will be loaded as long as the bundle in question is loaded).
52
69
* bundle_id maps to addr_build_bundles.id
53
70
* dependent_bundle_rid maps to addr_build_bundles.id
@@ -57,18 +74,18 @@ List files in bundles. These are the serialized files and external files.
57
74
* bundle_id maps to addr_build_bundles.id
58
75
* file_rid maps to addr_build_files.id
59
76
60
-
### `addr_build_explicit_assets`
77
+
####`addr_build_explicit_assets`
61
78
Explicit assets (marked as Addressable). Has Addressable name and asset information including paths.
You can analyze a directory with both asset bundles (*.bundle) and json files (*.json) at the same time.
@@ -97,51 +114,54 @@ You can analyze a directory with both asset bundles (*.bundle) and json files (*
97
114
Once the data is in the database, you can run queries to analyze your Addressables build:
98
115
99
116
#### Find the cache name for an addressables bundle
117
+
Addressables renames bundles to make it possible to do content updates. Internally bundles are still named by their internal hash and are cached based upon this name. If you want to lookup how a remote bundle will be cached in Unity's [cache](https://docs.unity3d.com/ScriptReference/Caching.html) you can use the addr_build_cached_bundles view.
100
118
```sql
101
119
-- Find cache name for an addressables bundle
102
-
SELECT cached_name
103
-
FROM addr_build_cached_bundles
104
-
WHERE catalog_name ='packedassets7_assets_all_61d3358060e969d3aad2d9c5c3a7d69b.bundle';
120
+
SELECT cached_namei
121
+
FROM addr_build_cached_bundles
122
+
WHERE name_in_catalog ='sharedenvironment_assets_all_5935f9c20c9b10664721f1591e3d2036.bundle'
123
+
AND build_id =1;
105
124
```
106
125
107
126
#### Bundle Size Analysis
127
+
This query works for groups that are packed together. It assumes group guids stay the same between builds and compares the bundle file size for a group between builds.
0 commit comments