Search Issue Tracker
By Design
Votes
0
Found in
5.4.0f3
Issue ID
831179
Regression
No
[AssetBundle] Sprite pivot setting change does not trigger bundle download cache rebuild
How to reproduce:
1. Download and open the project from OC
2. Notice that "amused" sprite's pivot is in the center
3. Build AssetBundle (Assets -> AssetBundles -> Build AssetBundles)
4. Open and play testScene scene
5. Both sprites stand in the same line. One in the left was in the scene, one in the right is loaded from asset bundles
6. Changes "amused" sprite's pivot (for example to Top Left)
7. Repeat 3-4 steps
8. Notice that both sprites look the same as in step 5
Reproducible: 5.3.6p5, 5.4.1p1, 5.5.0b3
By Design: The example case uses WWW.LoadFromCacheOrDownload( bundleURL, 0 ). That second parameter of '0' is the declared version of the bundle. Unity will cache that bundle on first download, and mark it as "version 0". Until someone calls LoadFromCacheOrDownload with a higher version, Unity will continue to use the cached version. This is independent of the underlying bundle changing.
Solution: The preferred method is to download the manifest which has the hash for all the bundles, then call UnityWebRequest.GetAssetBundle( bundleURL, bundleHash, 0) (this '0' is an unrelated CRC value).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- 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
Add comment