|
1 | | --- tables related to the AssetBundle and PreloadData objects |
2 | | - |
3 | | --- Do not confuse the AssetBundle Unity object (the source of much of this data) |
4 | | --- with the archives table, which is general to any Unity Archive. |
5 | | - |
6 | | --- The "assets" that an AssetBundle explicitly exposes: each m_Container entry of the AssetBundle |
7 | | --- object names an object (the addressable/asset name -> object it maps to). Populated only from |
8 | | --- the AssetBundle object, so this table is empty for Player and ContentDirectory builds. |
9 | | --- For scene bundles the entry names the scene and points at the synthetic Scene object (see |
10 | | --- AssetBundleHandler / SerializedFileSQLiteWriter). |
11 | 1 | CREATE TABLE IF NOT EXISTS assetbundle_assets( |
12 | | - object INTEGER, |
13 | | - name TEXT |
| 2 | + -- The assets an AssetBundle explicitly exposes: one row per m_Container entry of the |
| 3 | + -- AssetBundle object. Empty for Player and ContentDirectory builds, which have no such object. |
| 4 | + object INTEGER, -- objects.id; for a scene bundle this is the synthetic Scene object |
| 5 | + name TEXT -- the container path the asset is addressed by |
14 | 6 | ); |
15 | 7 |
|
16 | | --- object depends on dependency. This table has three sources, only the first of which is truly |
17 | | --- AssetBundle-specific: |
18 | | --- * AssetBundleHandler: an asset's slice of the AssetBundle object's m_PreloadTable. |
19 | | --- * SerializedFileSQLiteWriter: a scene object -> each object in the scene's SerializedFiles. |
20 | | --- * PreloadDataHandler: the PreloadData object's m_Assets. PreloadData is a *separate* Unity |
21 | | --- object (not part of the AssetBundle object) and also exists in Player builds (one per scene |
22 | | --- in its sharedAssetsN.assets, plus one in globalgamemanagers.assets), so this table is NOT |
23 | | --- empty there. Player builds have no scene object, so those rows hang off the PreloadData |
24 | | --- object itself; scene bundles hang them off the synthetic Scene object. |
25 | 8 | CREATE TABLE IF NOT EXISTS preload_dependencies( |
26 | | - object INTEGER, |
27 | | - dependency INTEGER |
| 9 | + -- Objects that Unity preloads alongside another object. Populated for AssetBundle and Player |
| 10 | + -- builds, but not ContentDirectory builds. See Documentation/analyzer-schema.md. |
| 11 | + object INTEGER, -- objects.id: an AssetBundle asset, a synthetic Scene, or a PreloadData object |
| 12 | + dependency INTEGER -- objects.id, or dangling_refs.id when the target was not analyzed |
28 | 13 | ); |
29 | 14 |
|
30 | 15 | CREATE VIEW IF NOT EXISTS assetbundle_asset_view AS |
| 16 | +-- AssetBundle assets with their object columns resolved. Inner join, so an asset whose object was |
| 17 | +-- not analyzed is omitted here but still present in assetbundle_assets. |
31 | 18 | SELECT |
32 | 19 | a.name AS asset_name, |
33 | 20 | o.* |
34 | 21 | FROM assetbundle_assets a INNER JOIN object_view o ON o.id = a.object; |
35 | 22 |
|
36 | 23 | CREATE VIEW IF NOT EXISTS preload_dependencies_view AS |
| 24 | +-- Preload dependencies of AssetBundle assets and scenes, with both sides resolved. Narrower than |
| 25 | +-- the table: Player-build rows and dangling dependencies drop out of the inner joins. |
37 | 26 | 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 |
38 | 27 | FROM assetbundle_asset_view a |
39 | 28 | INNER JOIN preload_dependencies d ON a.id = d.object |
|
0 commit comments