Search Issue Tracker
By Design
Votes
0
Found in
2017.1.2p4
Issue ID
1027757
Regression
No
"manifest.GetAllDependencies" outputs unnecessary AssetBundle dependancies
Reproduction steps:
1. Open "MinimalRepro.zip" project
2. Enter Play Mode
3. See Console output ("b,c,b,b")
4. Move "MatWithTexture" from AssetBundle "b" to "d" (Create "d" if necessary)
5. Rebuild the AssetBundles
6. Enter Play Mode
7. See Console output ("b,b,b")
Expected Result: Step 4 should output like step 7 ("a" depends on "b")
Actual Result: At step 4 an unnecessary AssetBundle dependancy is loaded ("a" depends on "b,c")
Reproduced with: 2018.3.0a11, 2018.2.6f1, 2018.1.9f2, 2017.4.10f1
Note:
"Asset Bundle Browser" lets you see what dependencies the AssetBundle has (Shows correct, like at step 7)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
- Previously deleted “DefaultLookDevProfile“ is present when upgrading the Editor version
- [Ubuntu] UI text and buttons are missing spaces in Unity Version Control > New Workspace window
- "Inherit attribute is not supported" warning is shown but attributes are available in VFX Graph Output and Update blocks
Resolution Note (2019.1.X):
The behavior of manifest.GetAllDependencies matches the behavior of how asset bundle building & loading code works in the BuildPipeline set of APIs. During building of asset bundles, dependency calculation stops at the first dependency found, at which point it records just that direct dependency. It does not continue to calculate additional recursive dependencies as this will be duplicated wasted time as it will be calculated when the dependent bundle is built. This means the manifest is also unaware of any recursive dependencies so the manifest code return the full recursive dependency list that it can calculate, and the loading code (assetBundle.LoadAsset) does the same, but does not load any additional objects that are not part of the asset you are loading. AssetBundleManifest has a GetDirectDependencies API that returns the non-recursive version.
In 2018.2 we did a complete rewrite of building asset bundles called the Scriptable Build Pipeline. Unlike the BuildPipeline set of API's, we opted for correctness and using very granular caching to get accurate data, and fast results.