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
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
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.