Search Issue Tracker
If asset bundle scene is loaded with one frame delay, object which uses non-readable texture is not loaded
How to reproduce:
1. Open the attached project
2. Make a build using the Build->Build with asset bundles menu
3. Run TerrainBundle.exe
4. Observe that there's no grass on the terrain and error message is displayed.
-If you change the code in AssetBundleManager.cs to load the scene immediately instead of one frame delay, the terrain loads correctly and the grass appears as expected.
-The scene also loads correctly in a regular build (see the Build without asset bundles menu)
-If you mark texture as readable (Select texture -> change texture type to Advanced -> select Read/Write enabled and apply), issue is not reproducible.
Reproducible: 5.4.0f1, 5.4.2f1, 5.5.0b9
Not reproducible: 5.3.6p7
Won't fix: The issue is that the atlas cannot be generated if the texture is not set to read/write. The fact that it sometimes worked if you load immediately vs delaying a frame was a bug though I was unable to get the grass to show up no matter if it was delayed a frame or not - but this is the correct behavior (to not render since the textures are not set up correctly). The only reason that it sometimes worked I think is that something else force the pixel data to be loaded in the editor (an inspector or something) at the time the bundles were created, thereby allowing the atlas to be generated even though those pixels should not have been available. (The atlas generation depends on the data being available, not the read/write flag).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Shadows are not cast when you first Blit the Shadow map and then set it back to Buffer
- Changes to instanced detail mesh material don't immediately apply
- [uGUI] Vertices retrieved from GetUIVertexStream method cannot be modified when adjusting them through script
- Scroll bar scrolls less in the Package Manager packages than elsewhere when pressing on the empty scroll bar area to scroll
- Undo.RegisterCreatedObjectUndo dirties the scene, but no actual changes to Scene are made