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
- RenderPipelineManager.activeRenderPipelineTypeChanged does not detect changes when changing the Render Pipeline Asset outside of Play Mode
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
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.