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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.