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
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
- Errors and warnings are thrown after installing Visual Effect Graph Learning Samples
Add comment