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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Add comment