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
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
Add comment