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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
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.