Search Issue Tracker
Fixed in 2017.1.X
[Asset Bundles] Sprite Renderer Sorting Layer is gone when asset is loaded from asset bundle
1. Open attached project.
2. Execute menu item: "BUG/Build Asset Bundles"
3. Open and play scene: MainMenu.
4. Press button "File Default" to load bundles.
5. Press button "Load Scene"
6 (optional). in hierarchy look for any sprites, check sorting layer
Expected result: A game scene should be loaded where you can walk shoot, with obstacles and falling enemies.
Actual result: A game scene is loaded, but only the background is visible. Other sprites are behind it.
This happens because when sprites are loaded from asset bundles, they lose their Sorting Layer value (it is always "Default" for every sprite). When the scene is played directly, it works perfectly fine, Sorting Layers are correct. Open scene "2D" to see that sprites do have Sorting Layers assigned to them.
OR: it might be that Sorting Layer is dropped when building asset bundles.
Not reproducible: 5.6.0a2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Hub][Linux] Hub .AppImage does not allow to upgrade the Hub from 2.4.5 to 3.0.0-beta.2
- [Profiler] Current frame button initially hides profile frame marker
- Missing function to reset or unset a specific resource in the local binding space of compute shaders
- [Linux][Hub] Unity Hub 2.4.5 does not open "Add modules" window when clicking "Install with Unity Hub" in Build Settings
- Multiple errors appear in the Console when building for IL2CPP