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

Asset Bundles

-

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.

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.