Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0p1
Issue ID
1030160
Regression
No
HideInHierarchy flag objects can not build into assetbundle
How to reproduce:
1. Open the attached project
2. Click Tools/Add Sub Asset
3. Click Tools/Build Assetbundle
4. Open the "Demo" scene
5. Click Play
6. Check the console (it logs objects inside both asset bundles)
Actual result: There are no sub-asset objects in SubAssetHide asset bundle.
Expected result: The asset bundle should contain sub-asset objects.
Reproducible with: 2018.2.0b2, 2018.1.0f2, 2017.4.2f1, 2017.2.2p4, 2017.1.3p3.
Notes:
"Tools/Add Sub Asset" adds sub-asset to "SubAssetHide" and "SubAssetVisible". The one added to SubAssetHide hideFlags is HideInHierarchy.
"Tools/Build Assetbundle" builds SubAssetHide and SubAssetVisible to two asset bundles.
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
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
- InvalidOperationException when using Game Camera Preview in Scene window with a custom RenderGraph pass
Resolution Note:
BuildPipeline.BuildAssetBundles builds based on what it can detect is being used. In the provided example, the main object is a material and it has no references to the HideInHierarchy objects thus it does not include them as it sees them as unused. Scriptable Build Pipeline (2018.2 package) changes this behavior to get all source objects instead and allows user filtering of those objects as needed.